Save disp output as a string/cell variable
Show older comments
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?
Accepted Answer
More Answers (2)
Jan
on 28 Jul 2021
Since Matlab R2021a:
str = formattedDisplayText(x)
Manish Vankudre
on 13 Mar 2018
0 votes
Can you please give an example an explain
Categories
Find more on Variables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!