Control System Toolbox Function Reference | ![]() ![]() |
Quick access to data for a frequency response data object
Syntax
[response,freq] = frdata(sys) [response,freq,Ts] = frdata(sys) [response,freq] = frdata(sys,'v')
Description
[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 Table 11-14, "Data Format for the Argument response in FRD Models," on page 80 for more information on the data format for FRD response data.
For SISO FRD models, the syntax
[response,freq] = frdata(sys,'v')
forces frdata
to return the response data and frequencies directly as column vectors rather than as cell arrays (see example below).
[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.Units
).
Arguments
The input argument sys
to frdata
must be an FRD model.
Example
freq = logspace(1,2,2); resp = .05*(freq).*exp(i*2*freq); sys = frd(resp,freq); [resp,freq] = frdata(sys,'v')
resp = 0.2040 + 0.4565i 2.4359 - 4.3665i freq = 10 100
See Also
frd
Create or convert to FRD models
get
Get the properties for an LTI model
set
Set model properties
![]() | frd | freqresp | ![]() |