Skip to Main Content Skip to Search
Product Documentation

frdata - Access data for frequency response data (FRD) object

Syntax

[response,freq] = frdata(sys)
[response,freq,covresp] = frdata(sys)
[response,freq,Ts,covresp] = frdata(sys,'v')
[response,freq,Ts] = frdata(sys)

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:

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. (Using idfrd models requires System Identification Toolbox software.) 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).

Arguments

The input argument sys to frdata must be an FRD model.

Examples

Extract Data from Frequency Response Data Model

Create a frequency response data model and extract the frequency response data.

Create a frequency response data 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 sys.

[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 freq(k).

See Also

frd | freqresp | get | set

  


Free Control Systems Interactive Kit

Learn more about resources for designing, testing, and implementing control systems.

Get free kit

Trials Available

Try the latest control systems products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS