Problems with MLE method and curve fitting!

Hi everyone, I hope someone can help me!
How can I estimate the parameters of a function (using an anonymous function) with the maximum likelihood method? I've seen several things on the internet (like mle, fminsearch) but nobody gives me the parameter values!
Example I have:
eq = fittype (@ (a, b, c, x) a * x. ^ 2 + b * x + c);
how do i get the values ​​of a, b and c with the MLE method?
Thanks a lot to everyone!

Respuestas (1)

Rishabh Mishra
Rishabh Mishra el 22 de En. de 2021
Hi,
Based on my understanding, you can use 'polyfitn' function to estimate the parameters a, b, c. For this purpose, you require a set of values of 'x' as double array and the corresponding values of function (a*x.^2 + b*x + c) stored in another double array say 'y'. Use the code below to estimate the co-efficient values for the function (a*x.^2 + b*x + c).
% assuming 'x' & 'y' are double arrays
% 'y' stores the function value corresponding to each element of 'x'
% 'n' stores degree of the function
n = 2;
p = polyfitn(x,y,n);
The values p.Coefficients(1), p.Coefficients(2) & p.Coefficients(3) correspond to estimated values of coefficients a, b & c respectively.
Hope this helps.

Categorías

Más información sobre Get Started with Curve Fitting Toolbox en Centro de ayuda y File Exchange.

Preguntada:

el 16 de En. de 2021

Respondida:

el 22 de En. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by