Exit standalone created application automatically
3 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I have created a standalone executable file using MATLAB based on a single script file. When I run the executable file from the command window, the outputs are displayed. But I need to press the ENTER key for the command window to display the current path. How to automatically exit the run and display the path in the command window?
0 件のコメント
回答 (1 件)
Image Analyst
2013 年 5 月 4 日
編集済み: Image Analyst
2013 年 5 月 4 日
You can put
pwd
into your code whenever you want it to print out the current folder to the console window. Or you can fancy it up with fprintf():
fprintf('The current working directory is:\n%s', pwd);
cd() will also return the current folder, as well as let you change directory to a new folder.
If you want the search path (a bunch of folders), then you can put path instead of pwd:
path
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Environment and Settings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!