Waitbar2

版本 1.0.0.0 (3.4 KB) 作者: Jasper Menger
Modification of standard waitbar function; neater code, and a fancy color shift effect added
2.1K 次下载
更新时间 2005/11/23

无许可证

WAITBAR2 - Displays wait bar with fancy color shift effect

Adaptation of the MatLab standard waitbar function:

WAITBAR2 is typically used inside a FOR loop that performs a
lengthy computation. A sample usage is shown below:
h = waitbar(0,'Please wait...', 'BarColor', 'g');
for i = 1:100,
% computation here %
waitbar(i/100, h);
end
close(h);

Examples for the 'BarColor' option:
- Standard color names: 'red', 'blue', 'green', etcetera
- Standard color codes: 'r', 'b', 'k', etcetera
- A RGB vector, such as [.5 0 .5] (deep purple)
- Two RGB colors in a matrix, such as [1 0 0; 0 0 1] (gradient red-blue)

The latter example shows how to create a custom color-shift effect. The top row of the 2x3 matrix gives the initial color, and the bottom row the end color.

引用格式

Jasper Menger (2024). Waitbar2 (https://www.mathworks.com/matlabcentral/fileexchange/9117-waitbar2), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R14SP2
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Dialog Boxes 的更多信息
致谢

启发作品: waitbar2a(x, whichbar, varargin)

Community Treasure Hunt

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

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