You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This Matlab function will generate an updating progress bar (waitbar) in the command window.
9
-
10
-
This is a useful tool during data processing over many iterations or time-cosuming computations.
11
-
12
-
This simple visual feedback allows to track current progress and may also be a valuable tool for debugging and finding with value/entry may be causing an error.
13
-
14
-
By using simple text output rather than a graphical interface, the computational sacrifice is minimised, which speeds tasks when compared to other waitbars that have graphical outputs.
15
-
16
-
The waitbar will adapt to the current width of your command window.
17
-
18
-
[](https://ch.mathworks.com/matlabcentral/fileexchange/122357-cmdwaitbar)
19
-
20
-
---
21
-
22
-
<br>
23
-
24
-
There are 2 viewer modes:
25
-
26
-
- Waitbar (viewer mode 1 - default): Good for global progression tracking, fast simple, customisable.
27
-
- Iteration (viewer mode 2): displays current iteration out of total for detailed view on current progress - good for debugging.
28
-
29
-
> NB: best use is to call the cmdWaitBar function at the start of the for-loop in order to get most accurate information for debugging!
8
+
<p>This Matlab function will generate an updating progress bar (waitbar) in the command window. </p>
9
+
<p>This is a useful tool during data processing over many iterations or time-cosuming computations. </p>
10
+
<p>This simple visual feedback allows to track current progress and may also be a valuable tool for debugging and finding with value/entry may be causing an error.</p>
11
+
<p>By using simple text output rather than a graphical interface, the computational sacrifice is minimised, which speeds tasks when compared to other waitbars that have graphical outputs.</p>
12
+
<p>The waitbar will adapt to the current width of your command window.</p>
13
+
<p><ahref="https://ch.mathworks.com/matlabcentral/fileexchange/122357-cmdwaitbar"><imgsrc="https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg" alt="View cmdWaitBar on File Exchange"></a></p>
14
+
<hr>
30
15
<br>
31
16
17
+
<p>There are 2 viewer modes:</p>
18
+
<ul>
19
+
<li>Waitbar (viewer mode 1 - default): Good for global progression tracking, fast simple, customisable.</li>
20
+
<li>Iteration (viewer mode 2): displays current iteration out of total for detailed view on current progress - good for debugging.</li>
21
+
</ul>
22
+
<blockquote>
23
+
<p>NB: best use is to call the cmdWaitBar function at the start of the for-loop in order to get most accurate information for debugging!
**Within a "for" loop in matlab, insert a call to the function with the following three arguments**
87
-
- iStart, the integer the for-loop starts at
88
-
- iStop, the final iterative value
89
-
- i, the current iteration's value
90
-
91
-
**Optional arguments that can be passed to the function:**
92
-
- '(char-of-choice)' for the waitbar. Default is '·', such as [···]. Only the first char in a string will be used when passed to the function as an argument (e.g: '-;' will generate [---]).
93
-
- Viewer mode: value 1 or 2. 1 (default) generates the waitbar with a percentage value. 2 generates the current iteration value over iStop (e.g: "Iteration: 72/223").
94
-
<br><br>
95
-
96
-
97
-
---
98
-
72
+
<h3id="how-to-use">How to use:</h3>
73
+
<p><strong>Within a "for" loop in matlab, insert a call to the function with the following three arguments</strong></p>
74
+
<ul>
75
+
<li>iStart, the integer the for-loop starts at</li>
76
+
<li>iStop, the final iterative value</li>
77
+
<li>i, the current iteration's value</li>
78
+
</ul>
79
+
<p><strong>Optional arguments that can be passed to the function:</strong></p>
80
+
<ul>
81
+
<li>'(char-of-choice)' for the waitbar. Default is '·', such as [···]. Only the first char in a string will be used when passed to the function as an argument (e.g: '-;' will generate [---]).</li>
82
+
<li>Viewer mode: value 1 or 2. 1 (default) generates the waitbar with a percentage value. 2 generates the current iteration value over iStop (e.g: "Iteration: 72/223").
0 commit comments