I have exported the E-field resulting from a simulation into a matlab file (call it myresult.mat). For this, I have created a pipeline that gets the fields from a simulation and then I have attached an exporter.

When I load myresult.mat in matlab I get the following variables:

**Axis0, Axis1, Axis2**with shape1x11 values per axis. These are the Cartesian grid axis**Snapshot0**with shape 1000,3. These are the 3 components of my field at the cell center of the Cartesian grid

I would like to reshape my flat list of values (i.e. Snapshot0) into a 4d array such that each dimension represents a component and the spatial axis, i.e. Snapshot0[c,i,j,k] where c is an index to the field component and i,j,k are indices to the discretization of space.