User`s guide
1 Data Processing
Commands for Generating and Sim ula ting Data (Continued)
Command
Description
Example
idinput
Constructs a signal
with the desired
characteristics, such
as a random G aussian
or binary signal or a
sinusoid, and returns a
matrix of input values.
u = iddata([],...
idinput(400,'rbs',[0 0.3]));
sim
Simulates response data
based on existing linear
or nonlinear parametric
model in the MATLAB
workspace.
To simulate the model output
y for a given
input, use the following command:
y = sim(m,data)
m
is the model object name, and data is input
data matrix or
iddata object.
Example – Creating Data with Periodic Inputs
1 Create a periodic input for t wo inputs and co nsisting of five periods , where
each period is 300 samples.
per_u = idinput([300 2 5])
2 Create an iddata object using the periodic input and leaving the output
empty.
u = iddata([],per_u,'Period',...
[300; 300]);
You ca n use the perio dic input to sim ula te the output, an d the us e etfe to
compute the estimated response o f the model.
% Construct polynomial model
m0 =idpoly([1 -1.5 0.7],[0 1 0.5]);
% Construct random binary input
u = idinput([10 1 150],'rbs');
1-116