필터 지우기
필터 지우기

Matlab higher order Bode error

조회 수: 2 (최근 30일)
ANIL ALAN
ANIL ALAN 2016년 10월 24일
댓글: ANIL ALAN 2016년 10월 27일
Hey,
I searched the site for this problem, people asked same questions, however I couldn't find any working answer for my problem.
The problem is, when I try to draw a Bode plot of second or higher order such as,
>> G=tf([1], [1 1 1]);
>> bode(G)
I get an error message saying
Error using +
Matrix dimensions must agree.
Error in freqgrid>psum (line 387)
p = [zeros(1,l2-l1) p1] + [zeros(1,l1-l2)
p2];
Error in freqgrid>LocalAddPhaseExtrema
(line 349)
rhs1 =
psum(conv(d1,d2),2*[psum(conv(polyder(d2),d1),-conv(polyder(d1),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 34)
[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 140)
In DynamicSystem/bode (line 95)
"Bode" command works for first order transfer functions though.
Can you explain what is the problem ?
Thanks in advance
  댓글 수: 3
ANIL ALAN
ANIL ALAN 2016년 10월 25일
Hi Star Strider,
Actually that is the main problem, because it is a simple command and should work, but it doesn't ! I tried this on R2015a and R2015b on same computer but kept giving the error. When I used a friend's PC it worked like your try. Is something wrong with any of PC settings ?
Anıl
Star Strider
Star Strider 2016년 10월 25일
Hi Anil,
It’s time for you to Contact Support.

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

답변 (1개)

Joshua Long
Joshua Long 2016년 10월 26일
편집: Joshua Long 2016년 10월 26일
This error can occur if the "draw.m" function used to draw the Bode plot is corrupted or if a defined function is getting higher priority over the default system defined function.
To resolve this issue please execute the following commands in you MATLAB command prompt and restart MATLAB:
>> rehash toolboxcache
>> restoredefaultpath
>> savepath
  댓글 수: 1
ANIL ALAN
ANIL ALAN 2016년 10월 27일
Hi,
Thank you for the answer.
When I run the command
restoredefaultpath
it gives the warning
Warning: Duplicate directory name:
C:\Program
Files\MATLAB\R2015b\toolbox\stateflow\stateflow
> In restoredefaultpath (line 52)
And nothing changed. What is the meaning, please ? And what should I do next ?
Anıl

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

카테고리

Help CenterFile Exchange에서 Plot Customization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by