Waitbar for Parfor

Versione 1.0.0 (2,53 KB) da Yun Pu
Waitbar or wait message for parfor or for loop.
1,9K download
Aggiornato 31 mar 2019

Visualizza la licenza

This script generates a waitbar or a wait message including (1) the percentage finished; (2) the time used; and (3) the estimated remaining time for parfor or other types of loop. The script uses "parallel.pool.DataQueue" to collect information from workers.

Example.m provides an example. Basically, we need to construct the object right before the loop, send a message to the object within the loop, and destroy the object after the loop.

%Example:
N = 100000;
WaitMessage = parfor_wait(N, 'Waitbar', true);
parfor i = 1: N
WaitMessage.Send;
pause(0.002);
end
WaitMessage.Destroy

Cita come

Yun Pu (2025). Waitbar for Parfor (https://it.mathworks.com/matlabcentral/fileexchange/71083-waitbar-for-parfor), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2019a
Compatibile con R2017a fino a R2019a
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Loops and Conditional Statements in Help Center e MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Versione Pubblicato Note della release
1.0.0