No BSD License  

Highlights from
Waitbar2

3.66667

3.7 | 3 ratings Rate this file 5 Downloads (last 30 days) File Size: 11.47 KB File ID: #9117
image thumbnail

Waitbar2

by Jasper Menger

 

23 Nov 2005 (Updated 23 Nov 2005)

Modification of standard waitbar function; neater code, and a fancy color shift effect added

| Watch this File

File Information
Description

WAITBAR2 - Displays wait bar with fancy color shift effect

Adaptation of the MatLab standard waitbar function:

WAITBAR2 is typically used inside a FOR loop that performs a
lengthy computation. A sample usage is shown below:
h = waitbar(0,'Please wait...', 'BarColor', 'g');
for i = 1:100,
% computation here %
waitbar(i/100, h);
end
close(h);

Examples for the 'BarColor' option:
- Standard color names: 'red', 'blue', 'green', etcetera
- Standard color codes: 'r', 'b', 'k', etcetera
- A RGB vector, such as [.5 0 .5] (deep purple)
- Two RGB colors in a matrix, such as [1 0 0; 0 0 1] (gradient red-blue)

The latter example shows how to create a custom color-shift effect. The top row of the 2x3 matrix gives the initial color, and the bottom row the end color.

Acknowledgements
This submission has inspired the following:
Improved waitbar
MATLAB release MATLAB 7.0.4 (R14SP2)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
26 Nov 2005 aresh anbari  
26 Feb 2006 Tamir suliman

Thanks for the this function it is gonna be usefull

06 Apr 2006 Ronald van 't Klooster

It does exactly what is says, a simple adjustment for more eye-candy.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
waitbar Cristina McIntire 10 Dec 2008 17:03:59
color gradient Cristina McIntire 10 Dec 2008 17:03:59
color shift Cristina McIntire 10 Dec 2008 17:03:59
for loop Cristina McIntire 10 Dec 2008 17:03:59

Contact us at files@mathworks.com