Time or frequencydomain data
data = iddata(y,[],Ts)
data = iddata(y,u,Ts)
data = iddata(y,u,Ts,'Frequency',W)
data = iddata(y,u,Ts,'P1',V1,...,'PN',VN)
data = iddata(idfrd_object)
data = iddata(y,[],Ts)
creates an iddata
object
for timeseries data, containing a timedomain output signal y
and
an empty input signal []
, respectively. Ts
specifies
the sample time of the experimental data.
data = iddata(y,u,Ts)
creates an iddata
object
containing a timedomain output signal y
and input
signal u
, respectively. Ts
specifies
the sample time of the experimental data.
data = iddata(y,u,Ts,'Frequency',W)
creates
an iddata
object containing a frequencydomain
output signal y
and input signal u
,
respectively.Ts
specifies the sample time of the
experimental data. W
specifies the iddata
property 'frequency'
as
a vector of frequencies.
data = iddata(y,u,Ts,'P1',V1,...,'PN',VN)
creates
an iddata
object containing a timedomain or frequencydomain
output signal y
and input signal u
,
respectively. Ts
specifies the sample time of the
experimental data. 'P1',V1,...,'PN',VN
are propertyvalue
pairs, as described in Properties.
data = iddata(idfrd_object)
transforms
an idfrd
object to a frequencydomain iddata
object.
y
Output signal from a system, specified as a column vector of
length N for a singleoutput system, where N is
the number of observations. For a multipleoutput system with Ny output
channels, specify y
as an NbyNy matrix. y
sets
the OutputData
property of the iddata
object.
Output data must be in the same domain as input data.
u
Input signal to a system, specified as a column vector of length N for
a singleinput system, where N is the number of
observations. For a multipleinput system with Nu input
channels, specify u
as an NbyNu matrix. u
sets
the InputData
property of the iddata
object.
Input data must be in the same domain as output data.
Ts
Time interval between successive data samples in seconds. Default
value is 1
. For continuoustime data in the frequency
domain, set Ts
to 0
.
'P1',V1,...,'PN',VN
Pairs of iddata
property names and property
values.
idfrd_object
Name of idfrd
data object.
To construct an iddata
object, you must
have already imported data into the MATLAB^{®} workspace, as described
in TimeDomain Data Representation.
Use the following syntax to create a timedomain iddata
object data
:
data = iddata(y,u,Ts)
You can also specify additional properties, as follows:
data = iddata(y,u,Ts,'Property1',Value1,...,'PropertyN',ValueN)
For more information about accessing object properties, see Properties.
Here, Ts
is
the sample time, or the time interval, between successive data samples:
For uniformly sampled data, Ts
is
a scalar value equal to the sample time of your experiment.
For nonuniformly sampled data, Ts
is []
,
and the value of the SamplingInstants
property
is a column vector containing individual time values. For example:
data = iddata(y,u,[],'SamplingInstants',TimeVector)
where TimeVector
represents a vector of time
values.
You can modify the property SamplingInstants
by
setting it to a new vector with the length equal to the number of
data samples.
The default time unit is seconds, but you can specify any unit
using the TimeUnit
property. For more information
about iddata
time properties, see Modifying Time and Frequency Vectors.
To represent timeseries data, use the following syntax:
ts_data = iddata(y,[],Ts)
where y
is
the output data, []
indicates empty input data,
and Ts
is the sample time.
Frequencydomain data is the Fourier transform
of the input and output signals at specific frequency values. To represent
frequencydomain data, use the following syntax to create the iddata
object:
data = iddata(y,u,Ts,'Frequency',w)
'Frequency'
is an iddata
property
that specifies the frequency values w
, where w
is
the frequency column vector that defines the frequencies at which
the Fourier transform values of y
and u
are
computed. Ts
is the time interval between successive
data samples in seconds for the original timedomain data. w
, y
,
and u
have the same number of rows.
You must specify the frequency vector for frequencydomain data.
For more information about iddata
time
and frequency properties, see Modifying Time and Frequency Vectors.
To specify a continuoustime system, set Ts
to 0
.
You can specify additional properties when you
create the iddata
object, as follows:
data = iddata(y,u,Ts,'Property1',Value1,...,'PropertyN',ValueN)
For more information about accessing object properties, see Properties.
After creating the object, you can use get
or
dot notation to access the object property values.
Use set
or dot notation
to set a property of an existing object.
The following table describes iddata
object
properties and their values. These properties are specified as propertyvalue
arguments 'P1',V1,...,'PN',VN
' in the iddata
constructor,
or you can set them using the set
command or dot
notation. In the list below, N
denotes the number
of data samples in the input and output signals, ny
is
the number of output channels, nu
is the number
of input channels, and Ne
is the number of experiments.
Property names are not case sensitive. You do not need to type the entire property name. However, the portion you enter must by enough to uniquely identify the property.
Property Name  Description  Value 

Domain  Specifies whether the data is in the time domain or frequency domain. 

ExperimentName  Name of each data set contained in the iddata object.  For Ne experiments, a 1 byNe cell
array of character vectors. Each cell contains the name of the corresponding
experiment. Default names are {'Exp1','Exp2',...} . 
Frequency 
(Frequencydomain data only) Frequency values for defining the Fourier Transforms of the signals.  For a single experiment, this is an 
InputData  Name of MATLAB variable that stores the input signal to a system.  For nu input channels and N data
samples, this is an N bynu matrix. 
InputName  Specifies the names of individual input channels.  Cell array of length nu by1 contains
the name of each input channel. Default names are {'u1';'u2';...} . 
InputUnit  Specifies the units of each input channel.  Cell array of character vectors of length nu by1 .
Each cell contains the units of the corresponding input channel, for
example {'rad','rad/s'} . 
InterSample  Specifies the behavior of the input signals between samples for transformations between discretetime and continuoustime.  For a single experiment:
For 
Name  Name of the data set.  Character vector that contains the name of the data set. For
example, 'dryer data' . The default value is '' . 
Notes  Comments about the data set.  Character vector or cell array of character vectors that contain
optional details about the data set. For example, 'data from
experiment 2' . 
OutputData  Name of MATLAB variable that stores the output signal from a system.  For 
OutputName  For a multipleoutput system, specifies the names of individual output channels.  Cell array of length ny by1 contains
the name of each output channel. Default names are {'y1';'y2';...} . 
OutputUnit  Specifies the units of each output channel.  A cell array of character vectors of length ny by1 .
Each cell contains the units of the corresponding output channel,
for example {'rad','rad/s'} . 
Period  Period of the input signal.  (Default) For a nonperiodic signal, set to inf .
For a multipleinput signal, this is an nu by1 vector
and the k th entry contains the period of the k th
input. For Ne experiments, this is a 1 byNe cell
array and each cell contains a scalar or vector of periods for the
corresponding experiment. 
SamplingInstants  (Timedomain data only) The time values in the time vector
calculated from the properties Tstart and Ts .  For a single experiment, this is an 
TimeUnit  (Timedomain data only) Time unit.  Specify TimeUnit as one of the following
values: 'nanoseconds' ,'microseconds' ,'milliseconds' ,'seconds' (default), 'minutes' ,'hours' , 'days' , 'weeks' , 'months' or 'years' . 
Ts 
Time interval between successive data samples in seconds. Must be specified for both time and frequencydomain data. For frequencydomain, it is used to compute Fourier transforms of the signals as discretetime Fourier transforms (DTFT) with the indicated sample time. NoteYour data must be uniformly sampled.  Default value is 1 . For continuoustime
data in the frequency domain, set to 0 ; the inputs
and outputs are interpreted as continuoustime Fourier transforms
of the signals. Note that Ts is essential also
for frequencydomain data, for proper interpretation of how the Fourier
transforms were computed: They are interpreted as discretetime Fourier
transforms (DTFT) with the indicated sample time. For multipleexperiment
data, Ts is a 1 byNe cell
array and each cell contains the sample time of the corresponding
experiment. 
Tstart  (Timedomain data only) Specifies the start time of the time vector.  For a single experiment, this is a scalar. For 
FrequencyUnit 
(Frequencydomain data only) Frequency unit.  Specifies the units of the frequency vector (see Frequency ).
Specify as one of the following: 'rad/TimeUnit' , 'cycles/TimeUnit' , 'rad/s' , 'Hz' , 'kHz' , 'MHz' , 'GHz' ,
or 'rpm' . The units 'rad/TimeUnit' and 'cycles/TimeUnit' are
relative to the time units specified in the TimeUnit property.
Setting FrequencyUnit does not change the frequency
vector. To convert the units and automatically scale frequency points,
use chgFreqUnit . 
UserData  Additional comments.  Any MATLAB data type. The default value is [] . 