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,
          ivar, iv4, oe,
          pem, spa, tfest,
          ssest, 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. To plot the real and imaginary parts of the data
        separately, use plot(real(data)) and plot(imag(data)),
        respectively. 
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 iddataobject. | 
| angle(data) | Phase angle (in radians) of each complex signals in iddataobject. | 
| complex(data) | For time-domain data, this command makes the iddataobject
                complex—even when the imaginary parts are zero. For frequency-domain data
                that only stores the values for nonnegative frequencies, such thatrealdata(data)=1, it adds signal values for negative
                frequencies using complex conjugation. | 
| imag(data) | Selects the imaginary parts of each signal in iddataobject. | 
| isreal(data) | 1whendata(time-domain or
                frequency-domain) contains only real input and output signals, and returns0whendata(time-domain or
                frequency-domain) contains complex signals. | 
| real(data) | Real part of complex signals in iddataobject. | 
| realdata(data) | Returns a value of 1whendatais a
                real-valued, time-domain signal, and returns0otherwise. | 
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