sweep_size()

Returns the sweep size of a data object

Syntax
y = sweep_size(x)

Arguments
Name Description Range Type Required
x data (-∞, ∞) integer, real, complex yes

Examples

Given 2-port S-parameters versus frequency, and given 10 frequency points, there are then ten 2 × 2 matrices. sweep_size() is used to return the sweep size of the S-parameter matrix, and its companion function size() returns the dimensions of the S-parameter matrix itself:
a = sweep_size(S)
returns 10
a = size(S)
returns {2, 2}
Irregular data:
Assume that the data is 3 dimensional with the last dimension being irregular. The independents are: Vsrc, size, time with dimension [3,2,irreg]. Then:

SwpSz=sweep_size(data)

will return:

__SIZE                  SwpSz

Vsrc=1.0,size=1.0

                1       20

Vsrc=1.0,size=2.0

                1       21

Vsrc=2.0,size=1.0

                1       59

Vsrc=2.0,size=2.0

                1       61

Vsrc=3.0,size=1.0

                1       76

Vsrc=3.0,size=2.0

                1       78

where __SIZE is an independent added by the sweep_size() function.
sweep_size(SwpSz) would return the correct size of the two outer variables:

(1)        (2)        (3)

 3          2          1

Defined in

Built in

See Also

size(), sweep_dim()

Notes/Equations

For regular data, this function returns a vector with an entry corresponding to the length of each sweep. For irregular data, the function returns a multi-dimensional data, which needs to be processed further to get the size. See example above.

 

Privacy Statement  | Terms of Use  | Legal | Contact Us  | © Agilent 2000-2008 

Contents
Additional Resources