Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Help with GUI loop taking an absurdly long timef

1 回表示 (過去 30 日間)
Alex V
Alex V 2012 年 4 月 29 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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 件)

この質問は閉じられています。

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by