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

Is there a way to display something from a function when running a program?

 採用された回答

Adam Danz
Adam Danz 2018 年 9 月 21 日
編集済み: Adam Danz 2018 年 9 月 21 日

0 投票

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);

1 件のコメント

Caroline
Caroline 2018 年 9 月 21 日
wow I am an idiot. Thank you haha

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeArduino Hardware についてさらに検索

質問済み:

2018 年 9 月 21 日

編集済み:

2018 年 9 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by