Printing 3D multidimensional array on a file
4 views (last 30 days)
Show older comments
I have a 3D multidimensional array and i need to write it to a text file. The model is 154x256x70 and i need the file to have lines that have 256 numbers on them each and separated with TAB or space.
So far I've used the command: dlmwrite('matlaboutput', reshape (matrix, [], 256), '\t')
But it doesn't seem to give the right output. It does give the numbers, but they seem to be mixed.
Is the command wrong for a 3D matrix or the command doesn't work that way?
And wich command should I use instead?
0 Comments
Answers (1)
Matt J
on 13 May 2013
data=mat2tiles(matrix,[154,256,1]);
dlmwrite('matlaboutput', vertcat(data{:}), '\t')
10 Comments
See Also
Categories
Find more on Data Import and Export in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!