简体   繁体   中英

Magnitude and phase response still possible to use Matlab's bode function?

I have the magnitude and phase response of a system. Now I can plot the bode easily using semilogx(frequency,abs(response)) (magnitude) and semilogx(frequency,angle(response)) (phase). However I was wondering if it is possible to use Matlab's bode function. Such as bode(frequency,response)

The reason I like Matlab's bode function is not mainly because it can calculate the magnitude and phase response but also because it provides 2 nice plotting functions which I really like.

  1. You are able to select to only the response of a single input-output.
  2. You are able to select to only show for example the magnitude or phase response.

So does someone know if this is possible? I guess somewhere there is a function which handles the plotting capabilities of the bode function.


I figured out that I can create anxm bode plot using h = resppack.bodeplot([n,m]); and I can plot the MIMO response using h.plot(freq',abs(resp)',angle(resp)');

But I do not yet have the abilities to select a response or choose to only show magnitude or phase response.

You can use frd to create a frequency response data model from a frequency response. For that, you will have to create a frequency response with freqz from your data. Then you should be able to use bode(frd) , as you would usually.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM