| Control System Toolbox™ | ![]() |
[response,freq] = frdata(sys)
[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 Data Format for the Argument Response in FRD Models 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).
The input argument sys to frdata must be an FRD model.
Typing the commands
freq = logspace(1,2,2); resp = .05*(freq).*exp(i*2*freq); sys = frd(resp,freq); [resp,freq] = frdata(sys,'v')
returns the FRD model data
resp =
0.2040 + 0.4565i
2.4359 - 4.3665i
freq =
10
100
![]() | frd | freqresp | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |