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?
您可以将matrix
reshape
为40列,然后将其写入
dlmwrite('matlaboutput', reshape( matrix, [], 40 ), '\t' );
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.