Is there any function which returns the content of a variable as string?
Show older comments
We have to know the data type when using `sprintf` and it can convert limited types to string.
disp(var) can show the content of a variable of any type but it doesn't return anything.
Accepted Answer
More Answers (1)
Fangjun Jiang
on 14 Mar 2016
Edited: Fangjun Jiang
on 14 Mar 2016
0 votes
num2str();
mat2str()
1 Comment
Walter Roberson
on 15 Mar 2016
Those require known the datatype.
Categories
Find more on Characters and Strings 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!