How to use function in the script of Matlab

1 次查看(过去 30 天)
I used matlab 2017 of academic version.
And I re-installed 2018b.
After that, when I run the script code that has a function in it, it ask me to make function.m file outside of script.
That is, new file function on the same folder.
But Before with 2017 version, I didn't get this problem
Could you give me some solution for this?
  4 个评论
CHOI HYUNDUK
CHOI HYUNDUK 2019-2-13
Yes, It's totally same.
It didn't happen this problem at the previous version.
Walter Roberson
Walter Roberson 2019-2-13
Nonetheless it is not permitted . The function name must be different than the script name . If an earlier release permitted it then it was a bug in the earlier release .

请先登录,再进行评论。

采纳的回答

madhan ravi
madhan ravi 2019-2-13
It’s always a good idea to read the documentation:

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by