Vous suivez désormais cette soumission
- Les mises à jour seront visibles dans votre flux de contenu suivi
- Selon vos préférences en matière de communication il est possible que vous receviez des e-mails
Displays a string inline in the command window, overwriting any output the method previously displayed.
Useful to update any displayed string in-place, for example to indicate the the state of a simulation in progress.
-----------------------------------
e.g.
displayInline;
tic;
for k = 1:1e6
if mod(k,1000)==0
displayInline(sprintf('test: iteration %d, elapsed time: %g s', k, toc));
end
...
RepeatSomeTimeConsumingTask;
...
end
displayInline(sprintf('test: completed %d iterations (in %g s)', k, toc));
-----------------------------------
A persistent variable 'displayInlineCount' is used to keep track of the length of the previously displayed string, so that it can be erased the next time.
'displayInlineCount' is reset if no argument is passed in or 'str' is null.
Note: Any output on the command window made by other functions (e.g. display) between successive calls to displayInline would cause an incorrect portion of the output to be overwritten.
Citation pour cette source
Damith Senaratne (2026). displayInline (https://fr.mathworks.com/matlabcentral/fileexchange/32510-displayinline), MATLAB Central File Exchange. Extrait(e) le .
Informations générales
- Version 1.0.0.0 (1,65 ko)
Compatibilité avec les versions de MATLAB
- Compatible avec toutes les versions
Plateformes compatibles
- Windows
- macOS
- Linux
| Version | Publié le | Notes de version | Action |
|---|---|---|---|
| 1.0.0.0 |
