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
For an FRD model with
Ny outputs and
Nfmultidimensional array where the
(i,j)entry specifies the response from input
freqis a column vector of length
Nfthat contains the frequency samples of the FRD model.
frd (Control System Toolbox) 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
sys. The covariance
covresp is a 5D-array
covH(i,j,k,:,:) contains the 2-by-2 covariance matrix of the response
(1,1) element is the variance of the
real part, the
(2,2) element the variance of the imaginary part and the
(2,1) elements the covariance between the
real and imaginary parts.
For SISO FRD models, the syntax
[response,freq] = frdata(sys,'v')
frdata to return the response data
as a column vector rather than a 3-dimensional array (see example
[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
Other properties of
sys can be accessed with
get or by
direct structure-like referencing (e.g.,
The input argument
be an FRD model.
Extract Data from Frequency Response Data Model
Create a frequency response data model by computing the response of a transfer function on a grid of frequencies.
H = tf([-1.2,-2.4,-1.5],[1,20,9.1]); w = logspace(-2,3,101); sys = frd(H,w);
sys is a SISO frequency response data (
frd) model containing the frequency response at 101 frequencies.
Extract the frequency response data from
[response,freq] = frdata(sys);
response is a 1-by-1-by-101 array.
response(1,1,k) is the complex frequency response at the frequency
Introduced before R2006a