I have a multidimensional Matlab array, which was created with operations using variables created by the ndgrid command:
[Z,R,T,Es]=ndgrid(z,r,t,E)
where z=r=0 and t is a vector of time values and E is a two dimensional matrix of size=[10,80]
I want to reshape it to a three dimensional array of size=[10,80,length(t)], where the vector t is copied as the third dimension for each of the 10*80 values which correspond to the E matrix values.
How can I do that? -since I understand that the reshape function has certain order in which it fills the new array ?