1
votes

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 a n x m 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.

1

1 Answers

1
votes

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.