The Output structure of a code is showing different outputs in command window and workspace
8 ビュー (過去 30 日間)
古いコメントを表示
Manikanta Aditya
2024 年 7 月 13 日
編集済み: Manikanta Aditya
2024 年 7 月 16 日
When working on a program, after executing it and checking output in MATLAB command window and in output from workspace is giving different outputs. Which is correct output here and what is this happening?
Command window output:
11 件のコメント
採用された回答
Walter Roberson
2024 年 7 月 13 日
The command window version is the result of an implicit execution of the display method. The display method examines the object details and displays whichever parts of it that it believes to be important, in whatever order it feels are important.
The workspace output examines the result of executing struct on the object. Hidden properties are exposed. Internal order is used.
その他の回答 (1 件)
dpb
2024 年 7 月 13 日
As @John D'Errico says, they're both correct only the workspace browser has unfolded the various struct content that is only displayed as the struct, not the content of the struct in command window. So, there's more to the struct than is just displayed at the command window, but it would be very annoying if the command window expanded everything...
4 件のコメント
参考
カテゴリ
Help Center および File Exchange で Data Import and Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!