Why does my run command disappear once i save a file?

169 views (last 30 days)
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 Comments
julien kuhn de chizelle
julien kuhn de chizelle on 3 Nov 2015
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 on 21 Apr 2016
I am experiencing the same problem. Code execution was paused, and I resumed control by pressing CTRL C...

Sign in to comment.

Answers (3)

Kyle Watters
Kyle Watters on 7 Feb 2018
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 on 5 Feb 2019
I had the same problem. Make sure you're in the editor tab.
  1 Comment
Bilal Sadiq
Bilal Sadiq on 14 Mar 2022
In linux,you must save the file with .m file ,It resolves the issue
Hope that helps

Sign in to comment.


Jan
Jan on 3 Nov 2015
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.

Categories

Find more on Environment and Settings in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!