Compute and plot frequency response magnitude and phase for linear frequencies

    Note:   ffplot will be removed in a future release. Use bode or bodeplot instead.


[mag,phase,w] = ffplot(m)
[mag,phase,w,sdmag,sdphase] = ffplot(m)


ffplot(m) plots a frequency response plot for the model m, which can be an idpoly, idss, idarx, idgrey, or idfrd object. This frequency response is a function of linear frequencies in units of inverse time (stored as the TimeUnit model property). The default frequency values are determined from the model dynamics. For time series spectra, phase plots are omitted. For MIMO models, press Enter to view the next plot in the sequence of different I/O channel pairs, annotated using the InputNames and OuputNames model properties.

ffplot(m,w) plots a frequency response plot at specified frequencies w in inverse time units, which can be:

  • A vector of values.

  • {wmin,wmax}, which specifies 100 linearly spaced frequency values ranging from a minimum value wmin and a maximum value wmax.

  • {wmin,wmax,np}, which specifies np linearly spaced frequency values.

    Note:   For idfrd models, you cannot specify individual frequencies and can only limit the frequencies range for the internally stored frequencies using {wmin,wmax}.

ffplot(m,'noise') plots a frequency response plot of the output noise spectra when the model contains noise spectrum information.

ffplot(m1,...,mN,'sd',sd,'mode','same','ap',ap,'fill') plots a frequency response plot for several models. sd specifies the confidence region as a positive number that represents the number of standard deviations. The argument 'fill' indicates that the confidence region is color filled. mode = 'same' displays all I/O channels in the same plot. Set ap = 'A' to show only amplitude plots, or ap = 'P' to show only phase plots.

[mag,phase,w] = ffplot(m) computes the magnitude mag and phase values of the frequency response, which are 3-D arrays with dimensions (number of outputs)-by-(number of inputs)-by-(length of w). w specifies the frequency values for computing the response even if you did not specify it as an input. For SISO systems, mag(1,1,k) and phase(1,1,k) are the magnitude and phase (in degrees) at the frequency w(k). For MIMO systems, mag(i,j,k) is the magnitude of the frequency response at frequency w(k) from input j to output i, and similarly for phase(i,j,k). When m is a time series, mag is its power spectrum and phase is zero.

[mag,phase,w,sdmag,sdphase] = ffplot(m) computes the standard deviations of the magnitude sdmag and the phase sdphase. sdmag is an array of the same size as mag, and sdphase is an array of the same size as phase.

See Also

| | | | | |

Was this topic helpful?