MATLAB: How to save a matrix that contains NaN, strings and numbers

matricsave

Dear all,
I want to save a matrix 'out' that contains NaN, strings and numbers
I tried
save out
but did not work. Any ideas?
Thanks in advance

Best Answer

out={10 20 nan 'str' [1 2] [1 0;2 4]}
You can save your data in a mat file:
save filename out