matlab 中定义函数,如何定义,我每次都会出现这个问题?Error: Function definitions are not permitted a

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/30 18:52:20
matlab 中定义函数,如何定义,我每次都会出现这个问题?Error: Function definitions are not permitted a

matlab 中定义函数,如何定义,我每次都会出现这个问题?Error: Function definitions are not permitted a
matlab 中定义函数,如何定义,我每次都会出现这个问题?Error: Function definitions are not permitted a

matlab 中定义函数,如何定义,我每次都会出现这个问题?Error: Function definitions are not permitted a
给你起个简单的例子 y=f(x)=2x^2+5x 求f(5).
function y=f(x)
y=2*2^2+5*x;
这个自定义函数是不用你去运行的,运行肯定就是有错误,你只需要提用它就行了,比如就上面编完了 我只需在命令窗口输入f(5),就可以得出结果了.
如果还不懂,你可以hi我~~