Save disp output as a string/cell variable
显示 更早的评论
The command disp(x) does a reasonable job of displaying variables of any class. For example, it expands structures to show their fields and values. Is it possible to capture this formatted output as a variable?
采纳的回答
更多回答(2 个)
Jan
2021-7-28
Since Matlab R2021a:
str = formattedDisplayText(x)
Manish Vankudre
2018-3-13
0 个投票
Can you please give an example an explain
类别
在 帮助中心 和 File Exchange 中查找有关 Variables 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!