作者candy88257 (阿泰斯)
看板MATLAB
标题[讨论] 双for回圈的waitbar怎麽写?
时间Fri Apr 19 19:37:30 2013
如题
一个for回圈的waitbar已经写出来了
但是,双for回圈要怎麽用waitbar显示整体进度?
如
for ii=1:10
for jj=1:10
end
end
这种,要怎麽弄?
恳求帮助!
感谢!!!
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.130.17.157
1F:推 Steven1226: h = waitbar(0,'Please wait...'); 04/19 23:07
2F:→ Steven1226:for ii=1:10 04/19 23:07
3F:→ Steven1226: for jj=1:10 04/19 23:07
4F:→ Steven1226: waitbar( ((ii-1)*10+jj) /(10*10) ); 04/19 23:07
5F:→ Steven1226: pause(0.05) 04/19 23:08
6F:→ Steven1226: end 04/19 23:08
7F:→ Steven1226:end 04/19 23:08
8F:→ candy88257:为何要暂停程式0.05秒? 04/20 12:15
9F:→ jatj:不用pause来画 用drawnow就可以了 04/21 10:09
10F:→ jatj:他暂停是因为这样plot才会显示 但是用drawnow即可 04/21 10:09
11F:→ candy88257:高手,感谢!! 04/21 11:30
12F:推 Steven1226:感谢楼楼上 04/23 09:41