How to Create a matlab executable with sub-folders ?

3 vues (au cours des 30 derniers jours)
john brice
john brice le 9 Juin 2014
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 commentaire
Nir Gutman
Nir Gutman le 20 Avr 2020
This also bothered me for quite a long time

Connectez-vous pour commenter.

Réponses (1)

Image Analyst
Image Analyst le 20 Avr 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.

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by