This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Package: frest

Random input signal for simulation


input = frest.Random('OptionName',OptionValue)
input = frest.Random(sys)


input = frest.Random('OptionName',OptionValue) creates the Random input signal using the options specified by comma-separated name/value pairs.

input = frest.Random(sys) creates a Random input signal based on the dynamics of a linear system sys.

To view a plot of your input signal, type plot(input). To obtain a time series for your input signal, use the generateTimeseries command.

Input Arguments


Linear system for creating a random signal based on the dynamic characteristics of this system. You can specify the linear system based on known dynamics using tf, zpk, or ss. You can also obtain the linear system by linearizing a nonlinear system.

The resulting random signal automatically sets these options based on the linear system:

  • Ts is set such that the Nyquist frequency of the signal is five times the upper end of the frequency range to avoid aliasing issues.

  • NumSamples is set such that the frequency response estimation includes the lower end of the frequency range.

Other random options have default values.


Signal characteristics, specified as comma-separated option name and option value pairs.

Option NameOption Value
'Amplitude'Signal amplitude.

Default: 1e-5
'Ts'Sample time of the chirp signal in seconds.

Default: 1e-3
'NumSamples'Number of samples in the Random signal.

Default: 1e4
'Stream'Random number stream you create using the MATLAB® command RandStream. The state of the stream you specify stores with the input signal. This stored state allows the software to return the same result every time you use generateTimeseries and frestimate with the input signal.

Default: Default stream of the MATLAB session


Create a Random input signal with 1000 samples taken at 100 Hz and amplitude of 0.02:

input = frest.Random('Amplitude',0.02,'Ts',1/100,'NumSamples',1000);

Create a Random input signal using multiplicative lagged Fibonacci generator random stream:

% Specify the random number stream
stream = RandStream('mlfg6331_64','Seed',0);

% Create the input signal
input = frest.Random('Stream',stream);

Introduced in R2009b

Was this topic helpful?