Hi Jeremy,

Please can you be a bit more specific about what it is you don't understand. Is it that there are two slightly different uses of the word 'vector' here?

kx and ky are vectors in the Matlab sense of 'vector' meaning a list of numbers. They contain a discretised version of the wavenumber components in the x and y directions of the wavevector (kx,ky), where wavevector here means 'vector' in the mathematical sense meaning a quantity with direction and magnitude. k is the magnitude of the wavevector (kx,ky).

The relationship between the discretised spatial coordinates (x,y) and the discretised wavenumber components (the coordinates in wavenumber space) (kx,ky) is fixed by the requirements of the Fast Fourier Transform.

Hope that helps,

Ben