区网站开发语言,小米的网站建设的要点,微信小商店开店流程,惠东住房建设局网站当运行大程序#xff0c;需要跑大量数据的时候#xff0c;使用进度条可以看到程序究竟运行到什么地方了#xff0c;哈哈#xff0c;要不干等着难受(╯﹏╰)…… 
waitbar的作用是打开或者更新进度条。 
1 语法结构 
(1.1) h  waitbar(x,‘message’) 
x表示进度条的比例长度…当运行大程序需要跑大量数据的时候使用进度条可以看到程序究竟运行到什么地方了哈哈要不干等着难受(╯﹏╰)…… 
waitbar的作用是打开或者更新进度条。 
1 语法结构 
(1.1) h  waitbar(x,‘message’) 
x表示进度条的比例长度必须为0到1之间的数message是在进度条上显示的信息 
(1.2) waitbar(x,‘message’,‘CreateCancelBtn’,‘button_callback’)% 
通过制定CANCEL按键来终止程序运行。 (1.3) waitbar(x,‘message’,property_name,property_value,…) (1.4) waitbar(x) (1.5) waitbar(x,h) (1.6) waitbar(x,h,‘updated message’) 
通过(1.6)可以不断更新进度条上的信息用来显示程序运行的进度。 
(2) 结束时可以使用delete(h)或close(h)关闭它。 
hwaitbar(0,please wait);
for i1:1000%computation here%waitbar(i/1000,h)
end
delete(h);如果要用数字显示运行进度 
hwaitbar(0,please wait);for i1:1000%computation here%str[运行中...,num2str(i/1000*100),%];waitbar(i/1000,h,str)
end
delete(h);例1 
h  waitbar(0,Simulation inprocess);
for i1:1000ssprintf(Simulation in process:%d,ceil(i/10));waitbar(i/1000,h,[s %]);
end或h  waitbar(0,Simulation inprocess);
for i1:1000s[Simulation in process: num2str(ceil(i/10)) %];waitbar(i/1000,h,s);
end仿真图  
2 给waitbar添加标题 
h  waitbar(0,1,name,Simulation);
for i1:1000ssprintf(Simulation in process:%d,ceil(i/10));waitbar(i/1000,h,[s %]);
end仿真图  
———————————————— 
原文链接https://blog.csdn.net/MichaelPixer/article/details/55048754 http://blog.sina.com.cn/s/blog_acbf9f980102wma0.html http://blog.sina.com.cn/s/blog_b2eaf2760101dyjn.html