Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Help with GUI loop taking an absurdly long timef

1 visualización (últimos 30 días)
Alex V
Alex V el 29 de Abr. de 2012
Cerrada: MATLAB Answer Bot el 20 de Ag. de 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')

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by