Documentation |
Access data for frequency response data (FRD) object
[response,freq] = frdata(sys)
[response,freq,covresp] = frdata(sys)
[response,freq,Ts,covresp] = frdata(sys,'v')
[response,freq,Ts] = frdata(sys)
[response,freq] = frdata(sys) returns the response data and frequency samples of the FRD model sys. For an FRD model with Ny outputs and Nu inputs at Nf frequencies:
response is an Ny-by-Nu-by-Nf multidimensional array where the (i,j) entry specifies the response from input j to output i.
freq is a column vector of length Nf that contains the frequency samples of the FRD model.
See the frd reference page for more information on the data format for FRD response data.
[response,freq,covresp] = frdata(sys) also returns the covariance covresp of the response data resp for idfrd model sys. The covariance covresp is a 5D-array where covH(i,j,k,:,:) contains the 2-by-2 covariance matrix of the response resp(i,j,k). The (1,1) element is the variance of the real part, the (2,2) element the variance of the imaginary part and the (1,2) and (2,1) elements the covariance between the real and imaginary parts.
For SISO FRD models, the syntax
[response,freq] = frdata(sys,'v')
forces frdata to return the response data as a column vector rather than a 3-dimensional array (see example below). Similarly
[response,freq,Ts,covresp] = frdata(sys,'v') for an IDFRD model sys returns covresp as a 3-dimensional rather than a 5-dimensional array.
[response,freq,Ts] = frdata(sys) also returns the sample time Ts.
Other properties of sys can be accessed with get or by direct structure-like referencing (e.g., sys.Frequency).