I have used the function `reshape()` to help change sizes from a 3D matrix to a 2D one. Eg : 

```
a = [1 2; 3 4];
b = [5 6; 7 8];
c = cat(3,a,b);

```

Here `c` is the matrix with 3 dimensions. I used `reshape` to change it thus:

```
[n,m,d] = size(c);
d = reshape(c, [n*m , d]);

```

The size of `d` is 4x2. 

After this operation, how do I get back `c` from `d`? What I would like to know is the inverse of the `reshape` function.

Thank you.