Manipulating Complex-Valued Data
Supported Operations for Complex Data
System Identification Toolbox estimation algorithms support
complex data. For example, the following estimation commands estimate
complex models from complex data: ar, armax, arx, bj, covf, ivar, iv4, oe, pem, spa,
and n4sid.
Model transformation routines, such as freqresp and zpkdata,
work for complex-valued models. However, they do not provide pole-zero
confidence regions. For complex models, the parameter variance-covariance
information refers to the complex-valued parameters and the accuracy
of the real and imaginary is not computed separately.
The display commands compare and plot also
work with complex-valued data and models, but only show the absolute
values of the signals. To plot the real and imaginary parts of the
data separately, use plot(real(data)) and plot(imag(data)),
respectively.
Back to Top
Processing Complex iddata Signals at the Command Line
If the iddata object data contains
complex values, you can use the following commands to process the
complex data and create a new iddata object.
| Command | Description |
| abs(data) | Absolute value of complex signals in iddata object. |
| angle(data) | Phase angle (in radians) of each complex signals in iddata object. |
| complex(data) | For time-domain data, this command makes the iddata object
complex—even when the imaginary parts are zero. For frequency-domain
data that only stores the values for nonnegative frequencies, such
that realdata(data)=1, it adds signal values for
negative frequencies using complex conjugation. |
| imag(data) | Selects the imaginary parts of each signal in iddata object. |
| isreal(data) | 1 when data (time-domain
or frequency-domain) contains only real input and output signals,
and returns 0 when data (time-domain
or frequency-domain) contains complex signals. |
| real(data) | Real part of complex signals in iddata object. |
| realdata(data) | Returns a value of 1 when data is
a real-valued, time-domain signal, and returns 0 otherwise. |
For example, suppose that you create a frequency-domain iddata object Datf by
applying fft to a real-valued
time-domain signal to take the Fourier transform of the signal. The
following is true for Datf:
isreal(Datf) = 0
realdata(Datf) = 1
Back to Top
 | Transforming Between Time- and Frequency-Domain Data | | Linear Model Identification |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit