回复 8楼 maigicku 的帖子
function Testf=s(x)Testf=x+2;
end
这里面的end是不是要删除,还有后面的也是一样 原帖由 无水1324 于 2009-5-8 21:07 发表 http://www.chinavib.com/forum/images/common/back.gif
function Testf=s(x)
Testf=x+2;
end
这里面的end是不是要删除,还有后面的也是一样
院长好眼力! 这个end有无皆可!
from matlab help
end also marks the termination of an M-file function, although in most cases, it is optional. end statements are required only in M-files that employ one or more nested functions. Within such an M-file, every function (including primary, nested, private, and subfunctions) must be terminated with an end statement. You can terminate any function type with end, but doing so is not required unless the M-file contains a nested function.
感谢各位的帮助!
页:
1
[2]