Failure in initial objective function evaluation. LSQCURVEFIT cannot continue.

1 Ansicht (letzte 30 Tage)
凯 何
凯 何 am 24 Mär. 2021
Kommentiert: Matt J am 24 Mär. 2021
t=0:20;
N=[3.9000 5.2000 7.2000 9.6000 12.9000 17.1000 23.2000 31.4000 38.6000 50.2000 62.9000 76.0000 92.6000 106.5000 123.2000 131.7000 150.7000 179.3000 204.0000 226.5000 251.4000]
x0=[300.0000 0.3000]
x = lsqcurvefit(@logistic,x0,t,N)
f=logistic(x,t);
plot(t,N,'.',t,f,'m')
xlabel(Year)
ylabel(Population)
  2 Kommentare
Walter Roberson
Walter Roberson am 24 Mär. 2021
Bearbeitet: Image Analyst am 24 Mär. 2021
On my system it stops, saying that logistic is not defined.
Matt J
Matt J am 24 Mär. 2021
You should not pass your objective function to lsqcurvefit until you have verified that it works.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Matrix Computations finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by