i am trying to obtain to constants using 'lsqcurvefit' here's the code,
Both 'stretch' and 'stress' are of length 14 but I keep getting the error,
??? Error using ==> optim\private\lsqncommon at 98
LSQCURVEFIT cannot continue because user supplied objective function failed with the following error:
Error using ==> mrdivide
Matrix dimensions must agree.
Error in ==> lsqcurvefit at 182
[x,Resnorm,FVAL,EXITFLAG,OUTPUT,LAMBDA,JACOB] = ...
Error in ==> MonneyLSQ at 4
Any suggestions for this rather annoying error would be much appriciated thankyou.