How to get a program to display something from a function?

 Réponse acceptée

Adam Danz
Adam Danz le 21 Sep 2018
Modifié(e) : Adam Danz le 21 Sep 2018
Remove the semicolon at the end of
counter = counter + 1
The value of 'counter' will then display every time it's updated.
A more visually appealing method is to use fprintf
count = counter + 1;
fprintf('count = %d\n', count);

Plus de réponses (0)

Catégories

En savoir plus sur Startup and Shutdown dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by