Bode plot - Error using + Matrix dimensions must agree.
1 view (last 30 days)
Show older comments
Bode plot function not working for example problem. Code as follows:
H = tf([1 0.1 7.5],[1 0.12 9 0 0]);
bode(H)
But the output comes like this with blank bode plot:
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 347) lhs1 = psum(conv(n1,n2),2*[psum(conv(polyder(n2),n1),-conv(polyder(n1),n2)) 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 122) draw(this)
Warning: Error occurred while evaluating listener callback. > In DynamicSystem/bodeplot (line 140) In DynamicSystem/bode (line 95)_
2 Comments
Star Strider
on 3 Feb 2016
What Toolbox are you using?
What version of MATLAB? The current online documentation is for R2015b. I verified that it works correctly in R2015b.
Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!