I have a 13x13x100 array, L, of doubles that I write out using csvwrite(L, 'file.csv');. This produces a csv with 13 rows and 1300 columns, so using M=csvread('file.csv'); gives a 13×1300 array. Is there a smarter way to write this out or read this in so that M = L? Alternatively, is there an easy way to convert M from 13×1300 to 13x13x100?
I have a 13x13x100 array, L, of doubles that I write out using csvwrite(L,
Share
You can use the
reshape()function to convert M as you describeThe matrix elements are assigned column-wise, which is almost certainly what you want. Check the help for
reshape()