How to run multiple instances of the same gui using a loop?
Show older comments
Hello,
I am quite new to Matlab GUI and would like to use a "for" loop to generate several times the same gui but with different data inside. For instance, let's take the following case:
I have generated a simple GUI with a unique "Static Text" component inside. I would like the Static text to be updated in a new window at each iteration of the for loop (I have just added the following line under the Output function pasted from the testGUI2.m code):
set(handles.text1,'String',Hello(j));
(and I have also set : gui_Singleton = 0; at beginning)
And I simply want to do something like this: (in another code)
%%TEST GUI Loop
global Hello
Hello = {'hello1';'hello2';'hello3'};
for j = 1:length(Hello)
testGUI2(j)
end
I expect that the code pops up three windows (of the same GUI) with "hello1" in the first, "hello2" in the second and "hello3" in the third.
Can someone help me?
Many thanks in advance for your time and consideration.
Bari
1 Comment
Bari Abdulla
on 25 Jun 2016
Accepted Answer
More Answers (0)
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!