フィルターのクリア

auto-run m-file without command prompt?

2 ビュー (過去 30 日間)
Cathie Kessler
Cathie Kessler 2012 年 11 月 1 日
Forgive my ignorance, but is there a way to run an m-file without typing it at the command prompt?
I'd really like to have the user click on the name in an Explorer window or click an icon and go directly into the running program. I don't mind if the command window is in the background, but I don't really want the user to use it.
Thank you.

回答 (2 件)

Kaustubha Govind
Kaustubha Govind 2012 年 11 月 1 日
This previously answered question should help you create a desktop icon that runs a MATLAB file.

Jonathan Epperl
Jonathan Epperl 2012 年 11 月 1 日
As a primitive workaround you could put the following in a *.bat file:
Your_matlab_path\matlab -r "Your command"
so for instance
matlab -r "plot(peaks);"
That will open Matlab and execute plot(peaks); and keep Matlab open after that. For details and more command line options: http://www.mathworks.com/help/matlab/ref/matlabwindows.html

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by