Simple Script not working

2 次查看(过去 30 天)
******start Script*****
fuction err= WebersLawErr(p,x,y)
pred=WebersLaw(p,x);
err=sum((pred(:)-y(:)).^2);
******end script*******
%Matlab Command_
EDU>> err= WebersLawErr(p,x,y)
Attempt to execute SCRIPT WebersLawErr as a function: C:\Users\radioshack\Documents\MATLAB\WebersLawErr.m

采纳的回答

Image Analyst
Image Analyst 2014-6-17
fuction is not a keyword. Try function instead.
  2 个评论
Charles
Charles 2014-6-17
BWAHAHAHA lol I knew i wasn't crazy.
Image Analyst
Image Analyst 2014-6-17
Can you please mark as Accepted? Thanks.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Construct and Work with Object Arrays 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by