Home > . > update_waitbar.m

update_waitbar

PURPOSE ^

'update_waitbar': update the waitbar display, used for ACTION functions in the GUI 'series'

SYNOPSIS ^

function update_waitbar(hwaitbar,bar_size,advance_ratio)

DESCRIPTION ^

'update_waitbar': update the waitbar display, used for ACTION functions in the GUI 'series'
------------------------------------------------------------------
INPUT:
 hwaitbar:  handles of the waitbar to update
 bar_size: vector with 4 elements, representing the abscissa, ordinate, width, height of the waitbar relative to the GUI  
 advance_ratio: number between 0 and 1 representing the advancement of the calculation (loop index relative to the total length)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %'update_waitbar': update the waitbar display, used for ACTION functions in the GUI 'series'
0002 %------------------------------------------------------------------
0003 %INPUT:
0004 % hwaitbar:  handles of the waitbar to update
0005 % bar_size: vector with 4 elements, representing the abscissa, ordinate, width, height of the waitbar relative to the GUI
0006 % advance_ratio: number between 0 and 1 representing the advancement of the calculation (loop index relative to the total length)
0007 
0008 function update_waitbar(hwaitbar,bar_size,advance_ratio)
0009 waitbarpos(1)=bar_size(1);
0010 waitbarpos(3)=bar_size(3);
0011 waitbarpos(4)=advance_ratio*bar_size(4);
0012 waitbarpos(2)=bar_size(4)+bar_size(2)-waitbarpos(4);
0013 set(hwaitbar,'Position',waitbarpos)
0014 drawnow

Generated on Fri 13-Nov-2009 11:17:03 by m2html © 2003