MATLAB: How to save matrix to .txt file

fprintfmatrix

I have numerical matrix size of 64*60 and I like to save it to .txt file. How can I do it as easy as possible? without repeating %d with fprintf?

Best Answer

Hi,
use dlmwrite
a = rand(64,60);
dlmwrite('filename.txt',a)