Code covered by the BSD License  

Highlights from
txtprogressbar

Be the first to rate this file! 4 Downloads (last 30 days) File Size: 2.1 KB File ID: #15030

txtprogressbar

by Bogdan Cristea

 

17 May 2007 (Updated 24 May 2007)

show simulation progress and remaining time as text

| Watch this File

File Information
Description

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
   end

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
progressbar

MATLAB release MATLAB 7.4 (R2007a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
24 May 2007

help added, now simulation progress has one digit after the decimal point

Tag Activity for this File
Tag Applied By Date/Time
simulation progress Bogdan Cristea 22 Oct 2008 09:13:05

Contact us at files@mathworks.com