progressbar

버전 1.0.0.0 (5.45 KB) 작성자: Ohad Gal
Progressbar with an abort button.
다운로드 수: 10.8K
업데이트 날짜: 2003/6/18

라이선스 보기

This zip file contain 3 files:
progressbar.m - the progress bar
gui_active.m - polling function to be used in the runnig application (optional)
gauge_abort_icon.mat - the icon on the button (optional button)

Directions:
place 3 files in the same folder, and let MATLAB "know" it's path.
you can create as many progressbars as you want,
and update each of them using a unique handle.

if a progress bar is closed using the "X" button on the upper-right
corner of the progressbar, the function will create it again
with it's same state, see example below (use copy-paste)

% progressbar - shows a progress bar dialog based on the function "waitbar"
%
% Format: handle = progressbar( handle,increment [,string,titlestr] )
%
% Input: handle - handle to current progress bar, [] for a new one
% increment - a fraction (0..1) to increment by.
% (-1) signals the function to remove the handle from
% the persistant list and close the progressbar
% string - a string to be replaced in the progress bar (optional)
% titlestr - a title for the dialog box (optional)
%
% Output: handle - a graphic handle of the dialog box
%
%
% NOTE: this function uses a persistant list of handles and thier values.
% therefore, to delete a progressbar, please call the function with:
% progressbar( handle,-1 );
%
% an "abort" button is formed inside the progressbar, if the calling process
% uses the persistent function "gui_active". when the "abort" button is pressed,
% the Callback function "gui_active" changes it's value to zero, which enables
% the application to interactively stop execution
%
% Example: gui_active(1); % will add an abort button
% h = progressbar( [],0,'my test' );
% max_count = 1e+3;
% for idx = 1:max_count
% fprintf( '%d\n',idx )';
% h = progressbar( h,1/max_count );
% if ~gui_active
% break;
% end
% end
% progressbar( h,-1 );
%

인용 양식

Ohad Gal (2024). progressbar (https://www.mathworks.com/matlabcentral/fileexchange/3607-progressbar), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R12.1
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Dialog Boxes에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0