added waitbar, to monitor computations [especially useful for large models]

time-shift
Marco Ratto 2016-05-17 08:41:55 +02:00
parent 7c8878c071
commit f0b346b397
1 changed files with 3 additions and 1 deletions

View File

@ -25,6 +25,7 @@ mm=zeros(length(indx),replic);
disp('Evaluating simulated moment uncertainty ... please wait')
disp(['Doing ',int2str(replic),' replicas of length ',int2str(periods),' periods.'])
noprint0 = options_.noprint;
h = dyn_waitbar(0,'Simulated moment uncertainty ...');
for j=1:replic;
options_.irf = 0;
options_.noprint = 1;
@ -37,8 +38,9 @@ for j=1:replic;
dum=[dum; vec(oo_.autocorr{i}.*(sd*sd'))];
end
mm(:,j)=dum(indx);
dyn_waitbar(j/replic,h,['Simulated moment uncertainty. Replic ',int2str(j),'/',int2str(replic)])
end;
dyn_waitbar_close(h);
options_.noprint = noprint0;
cmm = cov(mm');
disp('Simulated moment uncertainty ... done!')