Bode plot from a string of complex numbers

I am trying to plot a Bode plot based on a string of comlpex numbers. Thus I have tried to convert the string to corresponding magnitude in decibles and angles in degrees. I use the following code:
R9 = 20*log(abs(nspeed));
theta9 = (180/pi())*(angle(nspeed));
However, when I plot this it is ovious that the code thus not return angles below -180. Does anyone know how this can be solved?

回答 (1 件)

Abhishek Gupte
Abhishek Gupte 2011 年 12 月 11 日

0 投票

The ANGLE function returns angles only between +/- pi. When the 'actual' angle goes above pi or below -pi, the ANGLE function will wrap the values. To get the 'actual' values, use the UNWRAP function.
theta9_unwrapped = unwrap( theta9 );

カテゴリ

ヘルプ センター および File ExchangeGet Started with Control System Toolbox についてさらに検索

質問済み:

2011 年 12 月 10 日

Community Treasure Hunt

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

Start Hunting!

Translated by