I suspect that the initial issue with NonlinearModelFit
is that your data is not in the correct format. The following might be considered:
data = Import["Z2.dat"];
z2 = Flatten[Table[{x, y, data[[x, y]]}, {x, 202}, {y, 101}], 1];
This gets you a 20,402 x 3 array (which is what NonlinearModelFit
expects: {x,y,z}
are the 20,402 "data points") rather than a 202 x 101 array. I would also suggest keeping your variables in lowercase (as all of Mathematical functions start in uppercase) and avoiding subscripts (unless there is some very special need for formatting purposes).
I've just used the indices for the values of x
and y
as I can't tell what those should be from your dataset.