Reputation: 135
Currently my matrix has the size of (40x50x60), and when I write it out with dlmwrite
, it writes a line for every x and the line is 50*60 long.
I need to write the same matrix but the lines should be 40 numbers long.
So i just need to divide the long lines with 40 and print a new line after 40 numbers and so on.
And the numbers should have the delimiter '\t'.
Right now im using:
dlmwrite('matlaboutput', matrix, '\t')
Is there something I can add to the command or should i use a different command for the result?
Upvotes: 1
Views: 457
Reputation: 114886
You may reshape
the matrix
to have 40 columns and then write it
dlmwrite('matlaboutput', reshape( matrix, [], 40 ), '\t' );
Upvotes: 2