In Matlab, you can reshape the Snapshot0 quantity in the following way.

- For
**cell-centered data**with 3 components (e.g. Electric field E(x,y,z)):

```
E = reshape(Snapshot0, [length(Axis0)-1, length(Axis1)-1, length(Axis2)-1, 3)
```

which you can then use as:

```
E[i,j,k,c]
```

where c is an index to the field component and i,j,k are indices to the discretization of space.

- For
**point data**with 1 component (e.g. Vector potential V(x,y,z)):

```
V = reshape(Snapshot0, [length(Axis0), length(Axis1), length(Axis2))
```

which you can then use as:

```
V[i,j,k]
```

where i,j,k are indices to the discretization of space.

]]>Thanks for this answer ! I get it now

Best,

LÃ©a

Internally, the way physical quantities (e.g. E, H, V, etc...) are discretised on different grids/meshes is dictated by the numeral method being used -- with the FDTD method, for example, results are more accurate if E and H are discretised differently. At post processing, typically in the "Sensor Extractor", the data are interpolated either on the nodes of the main grid or at the centres of each cell (this can be changed by ticking a box in the Sensor Extractor, but the default is usually what gives the best accuracy). When interpolating results in cell centres, the size of the data is "-1" in each direction, compared with when results are interpolated at the nodes (i.e. corners) of each cell.

Does that make sense?

best

]]>I have some trouble understanding why we have to put the -1 and why all the exported data do not have the same size.

Do you have an explanation maybe ?

Thanks a lot !

]]>