function call,,,,getting error
显示 更早的评论
hi, i am receiving the following error while i am inserting the function in the statement, can u plz help me to rid out of it??
Function definitions are not permitted at the prompt or in scripts.
please help
回答(1 个)
Oleg Komarov
2011-2-16
0 个投票
You're allowed to define a function only at the beginning of an .m file, then saving it and calling the function as fcn(x,y) at the cmd window or in a script you can get it 'working'.
Oleg
类别
在 帮助中心 和 File Exchange 中查找有关 Programming 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!