File Exchange

image thumbnail


version 1.0 (2.1 KB) by

show simulation progress and remaining time as text

1 Download


View License

This program is a text version of the "progressbar" program written by Steve Hoelzer. I have found this program useful when using Matlab in console mode (under Linux) for long simulations (usually several hours). I use to launch Matlab in the background with the following command:

nohup matlab -nojvm -nosplash -nodesktop < my_program.m &

All text output is directed to nohup.out file, which can be tested periodically with: "tail -f nohup.out". Using "nohup" has also the advantage that Matlab continues to run after the user is logged out.

Usage example of "txtprogressbar":
   n = 1000;
   txtprogressbar % Set starting time
   for i = 1:n
       pause(0.01) % Do something important
       txtprogressbar(i/n) % Update text

Comments and Ratings (1)

kasim tasdemir


I use 'dispstat' function just for this purpose. It can update the previous output which is a missing function of default 'disp'. Very simple to use. It can be downloaded from here:

***Sample usage:
 dispstat('','init'); % One time only initialization
 dispstat(sprintf('Begining the process...'),'keepthis','timestamp');
 for i = 97:100
     dispstat(sprintf('Progress %d%%',i),'timestamp');
     %doing some heavy stuff here

11:25:37 Begining the process...
11:25:37 Progress 100%

All the best

MATLAB Release
MATLAB 7.4 (R2007a)

Inspired by: progressbar

Inspired: Autoscaleit

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video