How do I capture the output from "display"
古いコメントを表示
Hello, I've got a fairly complicated structure containing multiple fields of various types and substructures also.
I want to print a "summary" of the structure out and would like to just take the output from the "display" function. However, it appears that there is no way to capture this other than a copy and paste (done manually). Does anybody know I capture the output from the display function so that I can write it to an ascii file?
Thanks!
採用された回答
その他の回答 (1 件)
Sean de Wolski
2012 年 5 月 10 日
It can be done using evalc, though I wouldn't recommend it:
x = evalc('disp(''hello world'')');
I would recommend generating a string with sprintf and perhaps fieldnames?
カテゴリ
ヘルプ センター および File Exchange で Environment and Settings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!