How to use fitoptions

4 views (last 30 days)
William
William on 9 May 2013
%define thermal voltage at room temperature
global kT Sun filename x
x=x(:,1) y=y(:,1)
kT=25.85e-3
fo=fitoptions('Method', 'NonlinearLeastSquares','Lower',[0 0 1 0 0],'Upper',[2 2 2 3000 30]);
ft2 = fittype('lambertsolar2(x, R_s, R_p, N, I_0, I_p)','options',fo)
'Startpoint',[20,2000,1.6,1e-6,1e-3]
solarfit= fit(x,y,ft2)
I was trying to fit a data called x and y onto a function called lambertsolar2. However, It would give me an error like
??? No appropriate method, property, or field startpoint for class curvefit.llsqoptions.
Error in ==> fit at 319 start = options.startpoint;
Error in ==> run2 at 23 solarfit= fit(x,y,ft2)
Any suggestions on how to fix this?
Thank you!

Answers (0)

Community Treasure Hunt

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

Start Hunting!