Simple waitbar

version 1.0.0.0 (2 KB) by Rahul Prem Nazeer
Displays the progressbar on the figure specified.

1.8K Downloads

Updated 1 Oct 2007

View License

This m-file allows to specify a waitbar on a figure where the user wants to display it. The sample usage of waitbar_new is as given.

function test
h = dialog('Units', 'Pixels', 'Position', [20 20 360 100],'visible','off');
h1 = uicontrol('Parent',h,'Units', 'Pixels', 'Position', [10 70 75 25],'String','Test','Callback',@test_button);
movegui(h,'center');
set(h,'visible','on');
function test_button(hObject,eventdata)
wh=waitbar_new(0, gcf, 'r', [10 30 300 14]);
%wh=waitbar_new(0, gcf, [0.8 .5 1]);
%wh=waitbar_new(0, gcf);
for i=1:10000
waitbar_new(i/10000);
end
delete(wh);

Cite As

Rahul Prem Nazeer (2022). Simple waitbar (https://www.mathworks.com/matlabcentral/fileexchange/16663-simple-waitbar), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R13SP1
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!