Function command y = f(x)
显示 更早的评论
So, here's a screenshot of my problem.
The upper part is the text from a Matlab Essentials book, and the lower part is where I try the example given in the book.
Why is it giving me an error? What am I missing here?
采纳的回答
更多回答(1 个)
Orion
2014-10-15
0 个投票
because you're trying to declare a function in the command window, which is impossible.
a function can only be declared in a Mfile.
类别
在 帮助中心 和 File Exchange 中查找有关 Adding custom doc 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!