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개)

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 CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by