Waitbar for Parfor

版本 1.0.0 (2.5 KB) 作者: Yun Pu
Waitbar or wait message for parfor or for loop.
1.7K 次下载
更新时间 2019/3/31

查看许可证

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

引用格式

Yun Pu (2024). Waitbar for Parfor (https://www.mathworks.com/matlabcentral/fileexchange/71083-waitbar-for-parfor), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2019a
兼容 R2017a 到 R2019a 的版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Loops and Conditional Statements 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0