Constructing n-dimensional coordinate mapping

If you have n-dimensional input data such as an image, funcFit needs an appropriate coordinate mapping.


Construct a coordinate array for n-dimensional fitting.

For n-dimensional fitting, funcFit requires a mapping from array index (i,j,k,…) to coordinate (x,y,z,…). This mapping must be given in the form of an array with dimension (n1, n2, …, nd), where ni is the length of the i-th coordinate axis and nd is the number of coordinate axes. Then, e.g. in the 2d case, [0,0,0] gives the x-coordinate of index [0,0] and [0,0,1] given the associated y-coordinate.


An arbitrary number of coordinate arrays.

Coordinate gridarray

An array of dimension (n1, n2, …, nd) where n1, n2, etc. is the length of the n-th coordinate axis and nd is the total number of dimensions.