I've got a matrix in matlab that's 28x28x10000. I'm looking to reshape it into a matrix that's 10000*784, with each 28x28 submatrix being squeezed into a row. So I tried
reshape(mat, 10000, 784)
While this does give me a matrix of the correct shape, the values aren't correct. Does anyone know of another way to do this, preferably without for loops?