I am trying to print a matrix to a text file using the DLMWRITE function as in the example below:
M = [1 ;2 ;3 ;4 ; 5]dlmwrite('myfile.txt', M, 'delimiter', '\t');
The file is created correctly, but when I open it using Notepad, I see all the matrix elements printed on a single line rather than each element being printed on a separate line. How can I ensure that each row in the matrix is printed on a separate line?
Best Answer