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

 채택된 답변

Jan
Jan 2015년 10월 1일

0 개 추천

Create an M-file, which opens the figures.

댓글 수: 10

Kelly Kyriakou
Kelly Kyriakou 2015년 10월 1일
How I will control that each figure opens when a specific button is pressed?
Thank you very much for you help
Walter Roberson
Walter Roberson 2015년 10월 1일
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.
Steven Lord
Steven Lord 2015년 10월 1일
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.
Kelly Kyriakou
Kelly Kyriakou 2015년 10월 4일
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?
Image Analyst
Image Analyst 2015년 10월 4일
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
Kelly Kyriakou
Kelly Kyriakou 2015년 10월 4일
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.
Walter Roberson
Walter Roberson 2015년 10월 4일
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.
Kelly Kyriakou
Kelly Kyriakou 2015년 10월 4일
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.
Walter Roberson
Walter Roberson 2015년 10월 4일
Did you specifically add the other .m and .fig to the list of files to include in the compilation?
Kelly Kyriakou
Kelly Kyriakou 2015년 10월 5일
편집: Kelly Kyriakou 2015년 10월 5일
of course I did it, at the following image you can see how I have done it.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

질문:

2015년 10월 1일

편집:

2015년 10월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by