How to run m-file instead of editor open

조회 수: 1 (최근 30일)
찬솔 박
찬솔 박 2021년 8월 13일
댓글: 찬솔 박 2021년 8월 14일
How to run m-file instead of editor open
I created an m file using a script editor. Running the m file opens the Editor window.
But instead of opening the editor window, I want it to run right away.
The m file that I used before was immediately executed, but the file that I created opens in the editor.

답변 (3개)

the cyclist
the cyclist 2021년 8월 13일
편집: the cyclist 2021년 8월 13일
If the name of the file is myfile.m, then typing
>> myfile
(without the >>) in the Command Window should simply execute the file. Is it possible that a command such as
edit myfile
is inside the file, so that when you run the file, it opens itself?
  댓글 수: 1
찬솔 박
찬솔 박 2021년 8월 13일
Thank you for reply your reply
but I want to run m-file just double-click on current folder window...
before i used another m-file, just double-click on current folder and it pop-up window for choose file(uigetdir)

댓글을 달려면 로그인하십시오.


the cyclist
the cyclist 2021년 8월 13일
If you have the MATLAB Compiler, you can create a stand-alone executable of your code. (That is a separate product with additional cost.)

Walter Roberson
Walter Roberson 2021년 8월 13일
Instead of double-clicking the file, click on it and use shift-F7 .
  댓글 수: 1
찬솔 박
찬솔 박 2021년 8월 14일
i use f9 hot key instead of double-clicik
thank u

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Entering Commands에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by