Open/close matlab app through command window

49 ビュー (過去 30 日間)
Punit
Punit 2014 年 7 月 17 日
回答済み: David Barry 2017 年 11 月 29 日
Hi
I am developing a Matlab app, and I would like to give two options to the user, - the GUI or programming using functions developed in the app. Is there any way I can run/close an app, without opening the GUI, through command window prompts, and when user clicks on the app-icon the GUI should open just like usual apps.
Thanks
-Punit
  3 件のコメント
Punit
Punit 2014 年 7 月 19 日
I'm novice in this filed so I need a little more guidance. When I package my app I need to specify the mainfile, which is the GUI file. Then I install the packaged app which creates the necessary files and folders in Matlab/MyApp folder. I think when I run installed app from the 'Apps' toolbar, matlab adds all the necessary paths and runs the main file i.e. the GUI. When I quit the app, matlab removes all the added paths, and hence I can not use any app programs. Now my real question is how do I run the app without the 'Apps tool strip'. And can I run the app without running the main file so that only the paths will be added. In other words I want something similar to
begin(MyApp)
app commands
end(MyApp)
Punit
Punit 2014 年 7 月 19 日
I Think I have found partial answer!
I can use matlab.apputil.run('MyApp') to start an app. Now I just need to figure out how to suppress the GUI
thanks -Punit

サインインしてコメントする。

回答 (1 件)

David Barry
David Barry 2017 年 11 月 29 日
Based on your comments it sounds like you should package your code as a toolbox. Toolbox code would then always be available on a users path. You can also distribute apps within toolboxes so you can still keep the app available in the app gallery. Take a look at the doc .

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by