How to Create a matlab executable with sub-folders ?

16 ビュー (過去 30 日間)
john brice
john brice 2014 年 6 月 9 日
回答済み: Image Analyst 2020 年 4 月 20 日
I am trying to create an executable at a top-level folder. But, I need to include several sub-folder when I create the executable. How do I do this ? when I compile to execuable crashes.
TOP_LEVEL_FOLDER - GUI.m file
SUB-FOLDERS(located in TOP_LEVEL folder) - FOLDER_A - FOLDER_B - FOLDER_C
Does any one know how to do this for Matlab R2009a ?
  1 件のコメント
Nir Gutman
Nir Gutman 2020 年 4 月 20 日
This also bothered me for quite a long time

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

回答 (1 件)

Image Analyst
Image Analyst 2020 年 4 月 20 日
Are you using the MATLAB compiler to build a standalone executable? Did you use the mkdir() function in your code? It should work - I do it all the time. Getting the location of the executable is tricky. I'm attaching a function for that. Also, if you're using Windows, and your program was installed under the Program Files folder, Windows won't let you create any files under there.
For installing, the deploytool that comes packages with MATLAB is pretty pathetic. I suggest you use an installation package building program specifically built for making installers. I use Gammadyne's Centurion Setup. I tried a lot of them and this is by far the nicest and easiest to use while still being very powerful and giving you tons of control over how things are installed.

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by