I'm using Matlab 7.0. How can I call a function? "File/New/Function" is missing.
显示 更早的评论

Or should I write an .m file instead beginning with:
function F = magic(x)
...
end
?
采纳的回答
更多回答(3 个)
Zoltán Csáti
2014-10-25
The syntax of writing a function is what you have written. When you want to call it, do
out = magic(in)
Be careful though, magic is a function that already exists.
Zoltán Csáti
2014-10-25
1 个投票
Not a problem. It is just a help for you so that MATLAB creates a sample in advance. I never use this feature because it is not cumbersome to type function.
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!