Help with fitting code

9 views (last 30 days)
Birol Ozturk
Birol Ozturk on 5 May 2015
Edited: Birol Ozturk on 5 May 2015
Dear All,
I am new to MATLAB and I am trying to use the attached MATLAB code to fit the attached aSi.txt data. I saved the functions with proper names as separate .m files in the same folder. I am getting the below error message when I try to run it.
Your help will be appreciated.
Thank you.
Birol
Error using lsqncommon (line 66) The Levenberg-Marquardt algorithm does not handle bound constraints and the trust-region-reflective algorithm requires at least as many equations as variables; aborting.
Error in lsqnonlin (line 236) [xCurrent,Resnorm,FVAL,EXITFLAG,OUTPUT,LAMBDA,JACOB] = ...
Error in Lorenzian_fit_N_Econd (line 48) [p,resnorm]=lsqnonlin(fitfunc, p, lbl, ubl, options, freq, real(epsilon), imag(epsilon));
Error in aSiFIT (line 99) p = Lorenzian_fit_N_Econd(f1, Eps, p, lb, ub, only_plot, ImReRatio);

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!