Nyquist function returns error
조회 수: 8 (최근 30일)
이전 댓글 표시
I get an error when trying to use the nyquist function, either with or without an argument. The error stems from a 'switch' argument having a double as an input. I have Matlab r2010a student edition with control system toolbox version 8.5 running on a 64-bit Dell Latitude E6510 with Windows 7. Please let me know if more information would be useful. The error is as follows:
num=[1 2];
den=[1 -2 -3];
h=tf(num,den)
nyquist(h)
??? SWITCH expression must be a scalar or string constant.
Error in ==> cot at 30
switch varargin{arg}
Error in ==> freqgrid>LocalResGrid at 244
ct = -cot(angles);
Error in ==> freqgrid at 102
[wnew,dlnew,drnew] = LocalResGrid(zp(:),Ts,dnpts,Grade);
Error in ==> ltidata.freqresp at 46
w = freqgrid(z,p,Ts,Grade,Focus);
Error in ==> resppack.ltisource.nyquist at 24
[mag,phase,w,FocusInfo] = freqresp(SysData(ct),1,wspec,true);
Error in ==> wavepack.waveform.draw at 21
feval(this.DataFcn{:});
Error in ==> wrfc.plot.draw at 18
draw(wf)
Error in ==> wrfc.plot.init_listeners>LocalRefreshPlot at 119
draw(this)
Warning: Error occurred while evaluating listener callback.
> In lti.nyquistplot at 103
In lti.nyquist at 83
In exresp at 40
In nyquist at 67
댓글 수: 0
채택된 답변
Walter Roberson
2011년 6월 13일
The built-in cot() function does not have 30 lines or any switch statement.
Please use
which -all cot
to see if perhaps you have accidentally introduced your own cot.m that is overriding the MATLAB one.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!