查看单个帖子
旧 2008-03-26, 17:11   #1
shipf2007
初级会员
 
注册日期: 2008-03-19
年龄: 45
帖子: 10
声望力: 18
shipf2007 正向着好的方向发展
不错 [分享]我的低级错误

我是一个初学者,在练习使用函数时,为了图省事,就把写的m文件命名为所练习的函数的名字,例如练习polar函数:
theta=0:0.01:2*pi
rho=sin(2*theta).*cos(2*theta)
polar(theta,rho,'k')
然后把m文件命名成了polar.m
结果就出现了下面的问题:
??? Attempt to execute SCRIPT polar as a function.

Error in ==> polar at 3
polar(theta,rho,'k')

希望能够成为前车之鉴。
同时再次谢谢无私帮助我的人们!
shipf2007 当前离线   回复时引用此帖