Why the command does not displaying my answer?

30 ビュー (過去 30 日間)
NUR SYAZWA
NUR SYAZWA 2022 年 6 月 10 日
回答済み: Walter Roberson 2022 年 6 月 10 日
why my answers are not showing in the command window after I run the code? It is shown in workspace but why it does not showing in the command windows? I need to view the answers for my code properly. Please answers my question immediately. thank you

採用された回答

Star Strider
Star Strider 2022 年 6 月 10 日
Remove the semicolon (;) from the end of each line to print out the results of that line to the Command Window.
The semicolon suppresses the output.

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2022 年 6 月 10 日
In order for output to show up at the command line, one of the following must occur:
  • you use fprintf with no file identifier
  • you use fprintf with file identifier (1)
  • under some circumstances, you use fprintf with file identifier (2)
  • you use disp()
  • you use display()
  • you run code that computes a result and you do not end the command with a semi-colon.
You do not have any of these. You compute things, but you have semi-colons and that specifically means that you do not want to display the results.
You need to add commands to display what you want displayed.

カテゴリ

Help Center および File ExchangeScripts についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by