Problem with ploting bode funcion of higher order

I have tried to plot a simple bode function of 3rd order and higher:
clear all;
clc;
close all;
s=tf('s');
w=1/(s*(s+1)^2)
bode(w)
but, didnt get any plot
instead I get the error after running the program :
w =
1
---------------
s^3 + 2 s^2 + s
Continuous-time transfer function.
output =
0×1 empty double column vector
output =
-Inf
50
50
Error using conv (line 28)
A and B must be vectors.
Error in freqgrid>LocalAddPhaseExtrema (line 357)
lhs2 = psum(conv(d1,d1),[conv(d2,d2) 0]);
Error in freqgrid (line 138)
w = LocalAddPhaseExtrema(w,z{1},p{1});
Error in ltipack.ltidata/freqresp (line 45)
w = freqgrid(z,p,Ts,Grade,Focus);
Error in resppack.ltisource/magphaseresp (line 36)
[mag,phase,w,FocusInfo] = freqresp(SysData(ct),grade,wspec,true);
Error in wavepack.waveform/draw (line 25)
feval(this.DataFcn{:});
Error in wrfc.plot/draw (line 17)
draw(wf)
Error in wrfc.plot/init_listeners>LocalRefreshPlot (line 79)
draw(this)
Warning: Error occurred while evaluating listener callback.
> In DynamicSystem/bodeplot (line 142)
In DynamicSystem/bode (line 94)
In bode1 (line 6)
>>
******by the way, the same bode function in different computer works perfectly.
Please anyone can Help me?
thank you,
Hezi

답변 (1개)

Star Strider
Star Strider 2021년 6월 3일
Yours is the second instance of this I have seen recently (the first being The inbuilt code "bode " is not working).
That was solved by uninstalling and rinstalling MATLAB and the Toolboxes. Since that is a bit extreme, if you would like a second opinion first, Contact Support.
Meanwhile, the posted code works in the online Run feature —
s=tf('s');
w=1/(s*(s+1)^2)
w = 1 --------------- s^3 + 2 s^2 + s Continuous-time transfer function.
bode(w)
.

카테고리

도움말 센터File Exchange에서 Get Started with Control System Toolbox에 대해 자세히 알아보기

질문:

2021년 6월 3일

답변:

2021년 6월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by