permute()

Permutes data based on the attached independents

Syntax
y = permute(data, permute_vector)

Arguments
Name Description Range Type Required
data any N-dimensional square data (all inner independents must have the same value N) (-∞, ∞) integer, real, complex yes
permute_vector any permutation vector of the numbers 1 through N † (-∞, ∞) integer, real, complex yes
† The permute_vector defaults to {N::1}, representing a complete reversal of the data with respect to its independent variables. If permute_vector has fewer than N entries, the remainder of the vector, representing the outer independent variables, is filled in. In this way, expressions remain robust when outer sweeps are added

Examples

This example assumes that the variable data has three independent variables; therefore:
a = permute(data)
reverses the (three inner independents of) the data
a2 = permute(data, {3, 2, 1})
same as above
aOrig = permute(data, {1, 2, 3})
preserves the data
The example below assumes that a DC analysis has been performed with two independent variables, VGS and VDS, and IDS.i is the dependent variable. To see a plot of IDS vs VGS for different values of VDS, the data can be permuted as follows:
permutedData = permute(IDS.i,{2,1})

Defined in

Built in

See Also

plot_vs()

Notes/Equations

The permute() function is used to swap the order of the independent variables that are attached to a data variable. For example, a data could have two independent variables in a particular order. To swap the order so that it can be easily plotted, the order of the independents must be swapped. The permute() function can be used for this purpose.

The permute() function cannot be used to swap the rows and columns of a matrix. However, it can be used to swap the orders of the independent, even if the dependent is a matrix. For example, a parameter sweep of an S-parameter analysis.

 

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

Contents
Additional Resources