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
Extended version of the idea Loren described here:
https://blogs.mathworks.com/loren/2007/08/01/monitoring-progress-of-a-calculation/#7
Say you have a loop that's running for a while. You're not sure whether it's worth getting a cup of coffee or not, so you display the current iteration using "disp(i)". At some point you're Matlab console is flooded with numbers, that's annoying. Especially if your loop does also display warnings. That's where this function comes to play. You just display the iteration using
writeConsoleCont(i);
In contrast to other contributions I found, this code is able to handle multiple lines of continuously updated text and has a basic plotting capabilities:
writeConsoleCont(); % initialization - always execute this first
for k = 0:100
writeConsoleCont(k); % numerical data
writeConsoleCont("Some text and plot", k, k^2);
pause(0.2);
end
Citation pour cette source
Tom DeLonge (2026). writeConsoleCont(text,varargin) (https://fr.mathworks.com/matlabcentral/fileexchange/63778-writeconsolecont-text-varargin), MATLAB Central File Exchange. Extrait(e) le .
Remerciements
Inspiré par : Overwritable message outputs to commandline window
Catégories
En savoir plus sur Creating, Deleting, and Querying Graphics Objects dans Help Center et MATLAB Answers
Informations générales
- Version 1.1.0.0 (3,97 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.1.0.0 | Added more documentation on where it differs from other's contributions... |
||
| 1.0.0.0 |
