How to Create a matlab executable with sub-folders ?

6 visualizzazioni (ultimi 30 giorni)
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 ?

Risposte (1)

Image Analyst
Image Analyst il 20 Apr 2020
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.

Categorie

Scopri di più su Startup and Shutdown in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by