from
statusbar3
by KBT WARKBT
similiar to statusbar
|
| tp3ej1(varargin)
|
% ---------------------------------------------------------------------
% Test for statusbar (see tsalesman.m)
% ---------------------------------------------------------------------
function tp3ej1(varargin)
clc;
close all;
de=[2];
nc=[2000];
wp=(rand([nc de])-.5)/10;
it=[1 2 3 4 5 6 7 8 9];
nu=[1 2 3 4 5 6 7 8 9]/50;
rv=[1000 500 100 25 10 7 4 2 1];
disp('If bored, press Ctrl + Pause/Inter')
%---------------------------------
statwinh=statusbar('Working ...');
perc=0;
%---------------------------------
for i=1:length(it)
wp=tsalesman(de,nc,wp,nu(min(i,length(nu))),it(i),...
rv(min(i,length(rv))));
%------------------------
perc=perc+it(i)/sum(it);
statusbar(perc,statwinh);
%------------------------
end
|
|
Contact us at files@mathworks.com