请问如何在matlab的waitbar中显示出计算的百分比,急!
我知道用waitbar ,可是怎么才能在waitbar命令条中显示出进程的百分比 原帖由 zhx 于 2007-2-4 13:40 发表我知道用waitbar ,可是怎么才能在waitbar命令条中显示出进程的百分比
help waitbar就可以了 就是没看懂啊 原帖由 zhx 于 2007-2-4 13:53 发表
就是没看懂啊
WAITBAR is typically used inside a FOR loop that performs a
lengthy computation.A sample usage is shown below:
h = waitbar(0,'Please wait...');
for i=1:100,
% computation here %
waitbar(i/100,h)
end
close(h)
回复 #1 zhx 的帖子
谢谢!我问的意思是在进度条的title上动态显示处理的百分数,,而不是'Please wait...':@L 原帖由 zhx 于 2007-2-4 19:51 发表谢谢!我问的意思是在进度条的title上动态显示处理的百分数,,而不是'Please wait...':@L
help waitbar 就可以看见以下信息:
WAITBAR(X,H,'updated title') will update the title text in
the waitbar figure, in addition to setting the fractional
length to X.
怎么都感觉eight说得够清楚了:
function WaitBarUseage
h = waitbar(0,'Please wait...');
for i=1:100,
waitbar(i/100,h,)
pause(.1)
end
close(h) 我是新手,不好意思啊,谢谢!
页:
[1]