Compiling many m and fig files

I have developed a software based on guide of matlab containing 10 windows and each window open by pressing a button. I have 10 'm' files and 10 'fig' files respectively. I want to compile it as a standalone exe. However, on compiler tool,at the first field, it is asked to insert a main file and at another field the required files in order to run my application. At first field I can import only one file. At the other filed I can import as many files as I want. Doing like this leads to an application that runs only the first window. How I should compile it?
Thank you in advance

 Accepted Answer

Jan
Jan on 1 Oct 2015
Create an M-file, which opens the figures.

10 Comments

How I will control that each figure opens when a specific button is pressed?
Thank you very much for you help
Create 10 buttons. Set their callbacks to openfig() the appropriate file. Be sure to tell the compiling tool to include each of the .fig and the corresponding .m as the static analysis will not be able to detect that it needs to include the files in this case.
Set the button callbacks to run the function files associated with each GUI, not to OPENFIG the figure files. If the callbacks are specified using function handles, this should tell the static analysis to include the functions and their associated figure files.
I am sorry but really can't understand and it's first time that I do this and feel that it is difficult enoufh. This is what I want: Open first fig, do some calculations press a button named 'next' current figure closes and then the second figure opens. Do some calculations at figure 2, press a button named 'next' current figure closes and 3rd figure opens....etc If I do as you told me I will have as 1st window a figure with 10 buttons and when a button is pressed the associated figure will open. Do I misunderstand?
Perhaps you'd like to start with an easy to use framework - a GUI that has all the controls on it. You can add more or delete some. Just right click on one to edit it's callback and put in your own custom code: MAGIC Gui
Actually, I have already created 15 guis that function very well, with buttons, plot, shapefiles etc... My problem is how to compile them in order to be a standalone exe to share my dveloped software.
Give the first GUI as the main function. If you have not already done so, code a push button in each to run the next GUI, which could turn the previous invisible (saves worrying about destroying an object while it is in use.) If you have used GUIDE then the static analysis might not be able to determine that you are calling the further functions, so you might need to add a list of all the .fig and .m files to the files to be included when compiling.
This is exactly what I have done. I gave the first GUI as main file where there is button to lead the user to next gui. I have used guide, so I have inserted all the needed m and fig files as required files to run the application. However, when I run the exe, the firsrt gui runs, when I press the button to lead me to next gui nothing happens.
Did you specifically add the other .m and .fig to the list of files to include in the compilation?
Kelly Kyriakou
Kelly Kyriakou on 5 Oct 2015
Edited: Kelly Kyriakou on 5 Oct 2015
of course I did it, at the following image you can see how I have done it.

Sign in to comment.

More Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!