Using an iddata object, how do I plot multiple frequency response estimations in the same bode plot, using Hz for the x-axis units?

Using an iddata object, how do I plot multiple frequency response estimations in the same bode plot, using Hz for the x-axis units?

 採用された回答

After estimating the frequency response of your data, you can use the "bodeplot" function and set the options to use Hz for the x-axis units.
Check out this template to create an iddata object, estimate the frequency response with several types of estimators, and then plot the results in the same bode plot.
DataObj=iddata(YourOutputDataVector,YourInpuDataVector,YourDataSampleTime);
% non-parametric
G1=spafdr(DataObj);
G2=spafdr(DataObj,'max',logspace(-1,2,100));
% parametric
zf = fft(DataObj);
mf=tfest(zf,4,4);
b = bodeplot(G1,G2, mf,G1.freq);
setoptions(b,'FreqUnits','Hz');

その他の回答 (0 件)

カテゴリ

製品

リリース

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by