Prev: HELP me find AVGPOWER
Next: A bug with integers
From: Alex Ter-Sarkissov on 3 Aug 2010 23:53 hi, sorry for a silly question. In this GUI I'm trying to display the current generation of the algorithm, preferably in a static text box (although I've unsuccessfully tried other options). Therefore within function_pushbutton1.Callback(..) that launches the algorithm I have the command set(handles.text7,'String',i), where i the the generation number. All I get is just the last generation. I hope there should be some solution to this problem, which would not be too hard. Naturally, in a non-GUI environment everything runs fine, but I want it to work in a GUI. cheers, alex
From: neil on 4 Aug 2010 00:05 "Alex Ter-Sarkissov" <ater1980(a)gmail.com> wrote in message <i3ao6v$k10$1(a)fred.mathworks.com>... > hi, sorry for a silly question. > > In this GUI I'm trying to display the current generation of the algorithm, preferably in a static text box (although I've unsuccessfully tried other options). Therefore within > > function_pushbutton1.Callback(..) > > that launches the algorithm I have the command > > set(handles.text7,'String',i), where i the the generation number. All I get is just the last generation. > > I hope there should be some solution to this problem, which would not be too hard. Naturally, in a non-GUI environment everything runs fine, but I want it to work in a GUI. > > cheers, > > alex I'm not 100% sure what the question is. Is the variable i, which you should avoid using because it is sqrt(-1), a loop var? If that is the case try put add a drawnow command after you set the value.
From: Alex Ter-Sarkissov on 4 Aug 2010 01:03 thanks! it worked! I didn't know about i since I've never used complex values, but thanks for this too) "neil " <neil.iain(a)gmail.com> wrote in message <i3aou5$5qu$1(a)fred.mathworks.com>... > "Alex Ter-Sarkissov" <ater1980(a)gmail.com> wrote in message <i3ao6v$k10$1(a)fred.mathworks.com>... > > hi, sorry for a silly question. > > > > In this GUI I'm trying to display the current generation of the algorithm, preferably in a static text box (although I've unsuccessfully tried other options). Therefore within > > > > function_pushbutton1.Callback(..) > > > > that launches the algorithm I have the command > > > > set(handles.text7,'String',i), where i the the generation number. All I get is just the last generation. > > > > I hope there should be some solution to this problem, which would not be too hard. Naturally, in a non-GUI environment everything runs fine, but I want it to work in a GUI. > > > > cheers, > > > > alex > > I'm not 100% sure what the question is. Is the variable i, which you should avoid using because it is sqrt(-1), a loop var? > > If that is the case try put add a > drawnow > command after you set the value.
|
Pages: 1 Prev: HELP me find AVGPOWER Next: A bug with integers |