声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

12
返回列表 发新帖
楼主: liushuiwuxin

[编程技巧] 急求:函数间符号方程的调用问题

[复制链接]
发表于 2009-5-8 21:07 | 显示全部楼层

回复 8楼 maigicku 的帖子

function Testf=s(x)
Testf=x+2;
end


这里面的end是不是要删除,还有后面的也是一样
回复 支持 反对
分享到:

使用道具 举报

发表于 2009-5-8 21:56 | 显示全部楼层

院长好眼力! 这个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.
 楼主| 发表于 2009-5-9 09:50 | 显示全部楼层
感谢各位的帮助!
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-11-17 10:01 , Processed in 0.050799 second(s), 15 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表