what this error mean
5 次查看(过去 30 天)
显示 更早的评论
plz what this error mean ?
Error: Function definitions are not permitted in this context.
0 个评论
回答(2 个)
Star Strider
2019-1-27
It means that you need to save your function as a seprate function file (a ‘.m’ file with the same name as your function) on your MATLAB search path.
0 个评论
madhan ravi
2019-1-28
When you are using version prior to 2016b a function definition cannot be included in a script (reason of your error) , therefore you need to save it in a separate file with the same name of a a function. Keep in mind you cannot paste a function in command window (in any versions of matlab).
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!