When I try to run the script ,many errors prevent the running.Is this script correct for running?
No, you need to be using .* to do your vectorized multiplications. Also, you have many rows where x(:,2)=0 which cannot possibly agree with your model, and causes all kinds of NaNs to be generated during the iterative search.
Also, are the coefficients all supposed to be non-negative? If so, nlinfit will not let you apply positivity constraints. I would recommend lsqcurvefit instead,
I assume Alex did something similar, since the result I get from this is very close to his,
0.6438 0.7292 -0.2038 -0.4317
0.2564 0.7363 0.0000 -0.4029