Monday, August 3, 2009

etime

Elapsed time

Syntax

  • e = etime(t2,t1)

Description

e = etime(t2,t1) returns the time in seconds between vectors t1 and t2. The two vectors must be six elements long, in the format returned by clock:

  • T = [Year Month Day Hour Minute Second]

Examples

Calculate how long a 2048-point real FFT takes.

  • x = rand(2048,1);
    t = clock; fft(x); etime(clock,t)
    ans =
    0.4167

Limitations

As currently implemented, the etime function fails across month and year boundaries. Since etime is an M-file, you can modify the code to work across these boundaries if needed.



etree

Elimination tree

Syntax

  • p = etree(A)
    p = etree(A,'col')
    p = etree(A,'sym')
    [p,q] = etree(...)

Description

p = etree(A) returns an elimination tree for the square symmetric matrix whose upper triangle is that of A. p(j) is the parent of column j in the tree, or 0 if j is a root.

p = etree(A,'col') returns the elimination tree of A'*A.

p = etree(A,'sym') is the same as p = etree(A).

[p,q] = etree(...) also returns a postorder permutation q of the tree.





etreeplot

Plot elimination tree

Syntax

  • etreeplot(A)
    etreeplot(A,nodeSpec,edgeSpec)

Description

etreeplot(A) plots the elimination tree of A (or A+A', if non-symmetric).

etreeplot(A,nodeSpec,edgeSpec) allows optional parameters nodeSpec and edgeSpec to set the node or edge color, marker, and linestyle. Use '' to omit one or both.

No comments:

Post a Comment