Info
This question is closed. Reopen it to edit or answer.
Help with GUI loop taking an absurdly long timef
1 view (last 30 days)
Show older comments
I have a loop which designates an animation that opens a pair of boxes (one overlaid on the other) by increasing in size from the center - the opening one works extremely well, animating smoothly and cleanly, but the closing version (code below) is extremely jerky. the closing version is over a more complicated background, but not that much more complicated, and it takes around 3 seconds to operate, rather than about 0.4 - any ideas why? as promised, heres the code:
posin = [55 55 651 451];
posbg = [0 0 761 561];
set(handles.infotxt,'Position',posin)
set(handles.bgbox,'Position',posbg)
for i=1:40
posin = posin - [-8.125 -5.625 16.25 11.25];
posbg = posbg - [-9.5 -7 19 14];
set(handles.infotxt,'Position',posin)
set(handles.bgbox,'Position',posbg)
pause(0.01)
end
set(handles.infotxt,'Visible','off')
set(handles.bgbox,'Visible','off')
0 Comments
Answers (0)
This question is closed.
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!