Help with GUI loop taking an absurdly long timef
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
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
답변 (0개)
이 질문은 마감되었습니다.
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!