Mu Analysis and Synthesis Toolbox    
crand, crandn, sysrand, varyrand

Generate a random complex CONSTANT, SYSTEM or VARYING matrix

Syntax

Description
crand and crandn generate random complex matrices of dimensions n x m, using the MATLAB rand and randn commands, respectively. crand elements are uniformly distributed and crandn elements are normally distributed.

Inputs to crand and crandn:

n
number of rows of the output matrix
m
number of columns of the output matrix

Output from crand and crandn:

out
an n x m complex matrix of random elements

sysrand generates a random SYSTEM matrix with nstates states, ninputs inputs, and noutputs outputs. Setting the stabflag to 1 will result in a stable, random SYSTEM. The default for stabflag is 0.

varyrand creates a random VARYING matrix with a specified number of rows (rdim), columns (cdim), and independent variable values (nindv). The optional argument ivflg sorts the independent variables to be monotonically increasing if it is set to 0 (default). Otherwise, if ivflg is set to a nonzero value, no sorting is done.

Examples
Create a CONSTANT, complex random matrix and a random SYSTEM matrix using the commands crand and sysrand

See Also
minfo, pck, pss2sys, rand, randel, sys2pss, unpck, vpck, vunpck



cos_tr, sin_tr, step_tr csord