Why does my run command disappear once i save a file?
244 次查看(过去 30 天)
显示 更早的评论
Hey. So I downloaded matlab however, the program does not let me run the script once I have saved the file. The run button appears at the beginning but once I save the script, it dissappears from the toolbar. Is there any way to fix this problem?
3 个评论
Paolo Castiglione
2016-4-21
I am experiencing the same problem. Code execution was paused, and I resumed control by pressing CTRL C...
回答(3 个)
Kyle Watters
2018-2-7
Try checking that the (.m) extension has been added to the filename. In the windows version this occurs automatically when saving a file, but in the linux version it must be done by the user. The Run button will not appear if the file is not recognized by matlab as executable.
0 个评论
Adam Mazurick
2019-2-5
I had the same problem. Make sure you're in the editor tab.
1 个评论
Bilal Sadiq
2022-3-14
In linux,you must save the file with .m file ,It resolves the issue
Hope that helps
Jan
2015-11-3
You run a script simply by typing its name (without the extension '.m') in the command window and hit return. Note that Matlab can find the file only, when it is in the current directory or if the folder is contained in the path. See:
doc addpath
doc pathtool
The first steps in Matlab are explained in the "Getting Started" chapters of the documentation.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!