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 个评论
julien kuhn de chizelle
Hi, before i save the script the run button is there but once i save the script in a .m file the button disappears. How do you run the script using the command window? I only know how to run it using the green play button. I am using MATLAB R2015b
Paolo Castiglione
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
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.

Adam Mazurick
Adam Mazurick 2019-2-5
I had the same problem. Make sure you're in the editor tab.

Jan
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 CenterFile Exchange 中查找有关 Environment and Settings 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by