matlab 7.0绘制根轨迹图时出现如下问题,开始还好好的,但之后却出现这个问题(程序一定没问题)。

a.m内容是
G=tf([1 4],[1 4 20]);
figure(1)
pzmap(G);
figure(2)
rlocus(G);
以下是运行后的问题!

To get started, select MATLAB Help or Demos from the Help menu.

The element type "name" must be terminated by the matching end-tag "</name>".
Could not parse the file: d:\matlab7\toolbox\ccslink\ccslink\info.xml
>> a
Warning: File: D:\matlab7\toolbox\control\control\@lti\private\gainrloc.m Line: 148 Column: 22

The expression on this line will generate an error when executed. The error will be: Attempt to execute SCRIPT j as a function.

> In lti.genrlocus at 59
In resppack.ltisource.rlocus at 22
In wavepack.waveform.draw at 21
In wrfc.plot.draw at 18
In wrfc.plot.init_listeners>LocalRefreshPlot at 87
In lti.rlocus at 94
In a at 5
Warning: File: D:\matlab7\toolbox\control\control\@lti\private\gainrloc.m Line: 152 Column: 24

The expression on this line will generate an error when executed. The error will be: Attempt to execute SCRIPT j as a function.

> In lti.genrlocus at 59
In resppack.ltisource.rlocus at 22
In wavepack.waveform.draw at 21
In wrfc.plot.draw at 18
In wrfc.plot.init_listeners>LocalRefreshPlot at 87
In lti.rlocus at 94
In a at 5
??? Error using ==> @lti\private\gainrloc>initgain
Attempt to execute SCRIPT j as a function.

Error in ==> wrfc.plot.init_listeners>LocalRefreshPlot at 87
draw(this)

??? Error occurred while evaluating listener callback.

代码没有问题。
查查自己是不是命名了一个 j 的m文件
或者有一个函数,名字叫做 j
修改下即可追问

膜拜,哥们,你太强了!能否留下QQ号,以后有问题可以向您请教!还有为什么命名为J会出现这种问题?

追答

好吧,其实我MATLAB用的时间也不长,互相帮助吧
QQ:467358255,加我的时候注明MATLAB就行了
命名为 j 产生冲突了
冲突原因一般是和系统中保留的的函数冲突,或者和自己定义的函数冲突,当然和变量冲突的话不知道会不会出这个问题

追问

谢谢了!

温馨提示:答案为网友推荐,仅供参考