MATLAB Answers

How do I set the last handle to be applicated

1 view (last 30 days)
Huseyin on 14 May 2014
Answered: Huseyin on 14 May 2014
Hi there, It is hard to describe the problem that I faced but I will try to explain it as simple as I can. I am designing an interface with GUI that has five different applications.
The situation is simple. First I call/open a file with a push button, then I use it for five different/independent applications. For instance I use the file that I called for the first application. Then I look for the second application. In that second application the code uses the original file (when I first called) and does the application for it. What I want to do is that when I go through the second application, I want to use the result of the first application (not the original one!). So when I reach the last application (5th app), thus all the applications will be used.
The order in the 5 applications can be random like first I may use the 5th application then I continue with 3rd application with the result of 5th app.
When I was forming the code I just used "" when I open the file. Then when I go through the apps I used for example "" to call the file. This is why I use the original file every time. How can I fix that?

Answers (2)

Walter Roberson
Walter Roberson on 14 May 2014 = 'original file';
handles.currentwork = ....; %change it
guidata(gcf, handles); %update handles
handles = guidata(gcf); %fetch current handles
work = handles.currentwork;

Huseyin on 14 May 2014
I think what I missed was to "update handles" ! Thanks, now I am going to apply that and notify you when I finished.

Community Treasure Hunt

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

Start Hunting!