Skip to content

Commit 9de0588

Browse files
Update cmdWaitBar.html
1 parent 32b4c36 commit 9de0588

1 file changed

Lines changed: 38 additions & 54 deletions

File tree

pages/Fun things/cmdWaitBar.html

Lines changed: 38 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,24 @@ <h3><a href="https://github.com/HumanNeuronLab/cmdWaitBar/releases"><img src="ht
55
</div>
66
---
77

8-
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-
[![View cmdWaitBar on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](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><a href="https://ch.mathworks.com/matlabcentral/fileexchange/122357-cmdwaitbar"><img src="https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg" alt="View cmdWaitBar on File Exchange"></a></p>
14+
<hr>
3015
<br>
3116

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!
24+
<br></p>
25+
</blockquote>
3226
<table>
3327
<tr>
3428
<td> Viewer mode: </td> <td> Viewer 1 (default - waitbar) </td> <td> Viewer 2 (Current iteration) </td>
@@ -37,75 +31,65 @@ <h3><a href="https://github.com/HumanNeuronLab/cmdWaitBar/releases"><img src="ht
3731
<td> Example code </td>
3832
<td>
3933

40-
```matlab
41-
iStart = 1;
34+
<pre><code class="language-matlab">iStart = 1;
4235
iStop = 50000;
4336
for i = iStart:iStop
4437

45-
%(customise with e.g: '-')
38+
%(customise with e.g: &#39;-&#39;)
4639
cmdWaitBar(iStart,iStop,i)
4740

4841
%[Your code...]
4942
end
50-
```
51-
43+
</code></pre>
5244
</td>
5345
<td>
5446

55-
```matlab
56-
iStart = 1;
47+
<pre><code class="language-matlab">iStart = 1;
5748
iStop = 50000;
5849
for i = iStart:iStop
5950

6051
cmdWaitBar(iStart,iStop,i,2)
6152

6253
%[Your code...]
6354
end
64-
```
65-
55+
</code></pre>
6656
</td>
6757
</tr>
6858
<tr>
6959
<td> Command window output </td>
7060
<td>
7161

72-
![Alt Text](https://github.com/jonathanmonney/misc_assets/blob/main/cmdWaitBar/viewer1.gif)
73-
62+
<p><img src="https://raw.githubusercontent.com/jonathanmonney/misc_assets/refs/heads/main/cmdWaitBar/viewer1.gif" alt="Alt Text"></p>
7463
</td>
7564
<td>
7665

77-
![Alt Text](https://github.com/jonathanmonney/misc_assets/blob/main/cmdWaitBar/viewer2.gif)
78-
66+
<p><img src="https://raw.githubusercontent.com/jonathanmonney/misc_assets/refs/heads/main/cmdWaitBar/viewer2.gif" alt="Alt Text"></p>
7967
</td>
8068
</tr>
8169
</table>
8270
<br><br>
8371

84-
### How to use:
85-
86-
**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+
<h3 id="how-to-use">How to use:</h3>
73+
<p><strong>Within a &quot;for&quot; 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&#39;s value</li>
78+
</ul>
79+
<p><strong>Optional arguments that can be passed to the function:</strong></p>
80+
<ul>
81+
<li>&#39;(char-of-choice)&#39; for the waitbar. Default is &#39;·&#39;, such as [···]. Only the first char in a string will be used when passed to the function as an argument (e.g: &#39;-;&#39; 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: &quot;Iteration: 72/223&quot;).
83+
<br><br></li>
84+
</ul>
85+
<hr>
9986
<p align="center"> <b><u>cmdWaitBar</u></b> 2025
10087
| <a href="https://www.unige.ch/medecine/neucli/en/groupes-de-recherche/1034megevand/">Human Neuron Lab</a> - UNIGE
10188
| <a href="mailto:jonathan.monney@unige.ch">jonathan.monney@unige.ch</a></p>
10289
<br>
10390
<div align="center"><a href="https://www.unige.ch/medecine/neucli/en/groupes-de-recherche/1034megevand/">
104-
<img src="https://raw.githubusercontent.com/HumanNeuronLab/ERWiN/main/assets/UNIGE_logo.png" width="200"/>
91+
<img src="https://raw.githubusercontent.com/HumanNeuronLab/voxeloc/main/assets/UNIGE_logo.png" width="200"/>
10592
</a></div>
10693

107-
---
108-
</div>
109-
11094
<hr>
11195
</div>

0 commit comments

Comments
 (0)