h=waitbar(x,’message’); %其中x必须为0到1之间的数,message为显示的信息
h=waitbar(0,'please wait');
for i=1:1000
%computation here%
waitbar(i/1000,h)
end
delete(h);
h=waitbar(0,'please wait');
for i=1:1000
%computation here%
str=['运行中...',num2str(i/1000*100),'%'];
waitbar(i/1000,h,str)
end
delete(h);