I can't plot transfer functions higher than 3. order with command "bode"!

I define a transfer function and want to plot it with command bode as follows:
t=tf('s');
p=(s+1)*(s+2)/((s+3)*(s+4)*(s+5));
bode(p);
this gives me the following errors:
Error using .*
Matrix dimensions must agree.
Error in freqgrid>LocalAddPhaseExtrema (line 342)
d1 = den(end:-2:1); d1 = fliplr(d1 .* altsgn(1:length(d1)));
Error in freqgrid (line 139)
w = LocalAddPhaseExtrema(w,z{1},p{1});
Error in ltipack.ltidata/freqresp (line 46)
w = freqgrid(z,p,Ts,Grade,Focus);
Error in resppack.ltisource/magphaseresp (line 35)
[mag,phase,w,FocusInfo] = freqresp(SysData(ct),grade,wspec,true);
Error in wavepack.waveform/draw (line 26)
feval(this.DataFcn{:});
Error in wrfc.plot/draw (line 18)
draw(wf)
Error in wrfc.plot/init_listeners>LocalRefreshPlot (line 122)
draw(this)
Warning: Error occurred while evaluating listener callback.
> In DynamicSystem.bodeplot at 141
In DynamicSystem.bode at 96
when I define p as a function of only second order the above code works without problem! what am I doing wrong? may I change any settings somewhere? (I use matlab version R2013b)

댓글 수: 1

I'm having this error too, did you fixed it? it doesn't even work with the example code of the "bode" function (for an 3 order transfer fuction).

댓글을 달려면 로그인하십시오.

답변 (1개)

s=tf('s');
p=(s+1)*(s+2)/((s+3)*(s+4)*(s+5));
bode(p);

댓글 수: 1

Rakesh
Rakesh 2016년 2월 3일
편집: Rakesh 2016년 2월 3일
Other errors gone. Still i get
Error using + (line 63)
Matrix dimensions must agree.
Please advice

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Dynamic System Models에 대해 자세히 알아보기

질문:

2014년 3월 25일

편집:

2016년 2월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by