dlmwrite imprimiendo una matriz 3D para cada línea de dimensión x

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?

preguntado el 05 de mayo de 13 a las 15:05

1 Respuestas

Usted puede reshape el matrix to have 40 columns and then write it

dlmwrite('matlaboutput', reshape( matrix, [], 40 ), '\t' );

contestado el 05 de mayo de 13 a las 15:05

That did exactly what I needed! Thank you! - user2352084

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.