function progress(i,tot) nchunks = 20; chunk = floor(tot / nchunks); if i == 2 fprintf('\n|'); for j=1:nchunks fprintf('-'); end fprintf('|\n '); end if(mod(i,chunk) ==0) fprintf('o'); end if i == tot fprintf(' :-) \n'); end