Nonlinear least square regression

4 visualizaciones (últimos 30 días)
ameen
ameen el 23 de Mayo de 2013
Hi all i have 17 observation (x and y) the relation between them as follows
y = 0.392 * (1 - (x / J)) ^ i
i want to use nonlinear least square regression to know J and i
Thanks in advance

Respuesta aceptada

Eli Duenisch
Eli Duenisch el 23 de Mayo de 2013
Editada: Eli Duenisch el 23 de Mayo de 2013
Do you have the statistics toolbox installed? It supports nonlinear regression - look for NonLinearModel.fit() in the docs.
  5 comentarios
ameen
ameen el 24 de Mayo de 2013
thank you for your kind reply but i put my x values, then my y values, and put beta0=[0.65,1.1] then i write
mdl=nonlinearmodel.fit(x ,y ,'y=0.392*(1-x/b1)^b2',beta0)
and i received error message ' Undefined variable "nonlinearmodel" or class "nonlinearmodel.fit".'
Tom Lane
Tom Lane el 24 de Mayo de 2013
Try NonLinearModel.fit capitalized just that way. This should work in the most recent releases of MATLAB. Otherwise try nlinfit.

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by