Main Content

randatom

Generate random uncertain atom objects

Syntax

A = randatom(Type)
A = randatom(Type,sz)
A = randatom

Description

A = randatom(Type) generates a 1-by-1 type uncertain object. Valid values for Type include 'ureal', 'ultidyn', 'ucomplex', and 'ucomplexm'.

A = randatom(Type,sz) generates an sz(1)-by-sz(2) uncertain object. Valid values for Type include 'ultidyn' or 'ucomplexm'. If Type is set to 'ureal' or 'ucomplex', the size variable is ignored and A is a 1-by-1 uncertain object.

A = randatom, where randatom has no input arguments, results in a 1-by-1 uncertain object. The class is of this object is randomly selected between 'ureal','ultidyn' and 'ucomplex'.

In general, both rand and randn are used internally. You can control the result of randatom by setting seeds for both random number generators before calling the function.

Examples

The following statement creates the ureal uncertain object xr. Note that your display can differ because a random seed is used.

xr = randatom('ureal') 
xr =

  Uncertain real parameter "NMGXC" with nominal value 5.34 and variability [-2.99,1.92].

The following statement creates the variable ultidyn uncertain object xlti with three inputs and four outputs. You will get the results shown below if you set the random variable seed to 29.

rng(29,'twister');
xlti = randatom('ultidyn',[4 3]) 
xlti =

  Uncertain LTI dynamics "LOSWT" with 4 outputs, 3 inputs, and gain less than 0.293.

Version History

Introduced before R2006a