I'm trying to avoid making the user start MATLAB and then run the GUI, it would be most convenient if the user could simply activate an icon in a folder, similar to an executable. Can it be done?

 채택된 답변

Rick Rosson
Rick Rosson 2011년 7월 13일

1 개 추천

If you are using Windows, you can create a .bat file that would launch MATLAB and immediately run a MATLAB script that would change to the appropriate directory and then start the GUI.
The .bat file should contain:
matlab -r myscript
Make sure that myscript.m is located in a directory that is on the MATLAB path.
For more information:
docsearch matlab
HTH.

댓글 수: 1

Tadgh
Tadgh 2014년 1월 15일
Could you please explain how to create the .bat file. I am trying everything here as part of my final year project to do the same thing as above but can find no help.
Thank you

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

질문:

2011년 7월 13일

댓글:

2014년 1월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by