Ok... the solution was quite simple:
rb1=nlf_FitMag2D(r1,r2,tt.x0,tt.y0,tt.A,tt.B,tt.c);
With rb1 pointing to the target column (the Z values)
r1 pointing to the column with the X values and
r2 pointing to the column with the Y values.
Sometimes things turn out simple if you do a break...