注册 登录
编程论坛 Matlab

弱弱的问,关于plot函数的应用

wbggs 发布于 2006-05-17 22:48, 1319 次点击

figure
hold on
[JU]=1:1:10
[U]=1:1:10
for i=1:1:10
if JU(i)<=5
U(i)=20;
else
a=func(JU(i))
U(i)=a;
end
end
plot(JU,U,'r')
hold off


提示错误:??? Attempt to execute SCRIPT plot as a function.

Error in ==> JUBUxian at 24
plot(JU,U,'r')


为什么啊?

1 回复
#2
fuguoduan2006-05-18 15:18

注意在matlab中,输入法只对英文有效,尤其是对为拼音的“'”符号不认可,注意改正

1