Info
此问题已关闭。 请重新打开它进行编辑或回答。
undefined function or varaible
3 次查看(过去 30 天)
显示 更早的评论
Hi,
Every time i run my file, it comes up with an error 'undefined function or variable (variable name). However, the name of the function is the old name of the file, i called it attempt2, however, i managed to get a good start on my project, so renamed the file to something else, and did a search and replace with everything attempt2. The error still happens
0 个评论
回答(1 个)
madhan ravi
2018-12-28
编辑:madhan ravi
2018-12-28
The function has to be save in a separate file with the same name of a function if your using prior 2016b but since 2016b a script file can contain a function at the very end of the file.
Note: The file names should be unique not repeated (meaning the script file and the function name shouldn't be the same) .
doc function % read it
4 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!