Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Help with GUI loop taking an absurdly long timef

1 Ansicht (letzte 30 Tage)
Alex V
Alex V am 29 Apr. 2012
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
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')

Antworten (0)

Diese Frage ist geschlossen.

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by