File Exchange

image thumbnail

waitbarParfor

version 1.0.1 (1.88 KB) by Girmi Schouten
Waitbar implementation for parfor loops.

31 Downloads

Updated 13 Dec 2019

View Version History

View License

This package provides a waitbar for use in parfor loops without the need to write to files or any other external synchronization.

Cite As

Girmi Schouten (2021). waitbarParfor (https://www.mathworks.com/matlabcentral/fileexchange/73670-waitbarparfor), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (3)

Olaf Bousche

Great function.

To make it more useful I suggest a few small changes I made myself. I added the following code in the update function:
if toc(t_start) - t_last > 1
t_last = t_last + 1;
d = seconds(toc(t_start));
d.Format = "hh:mm:ss";
waitbar(loopCnt/totalLoops, waitbarHandle, compose("t = %s, %s",d,waitbarMessage));
end

And of course the corresponding start of the timer variable in the initialization:
% Get the time
t_start = tic;
t_last = 0;

Olaf

Toon Stas

Matthias

MATLAB Release Compatibility
Created with R2019b
Compatible with R2019b and later releases
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!