Nyquist function returns error

2 次查看(过去 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

采纳的回答

Walter Roberson
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 个)

类别

Help CenterFile Exchange 中查找有关 Characters and Strings 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by