Curve Fitting for an equation
Mostrar comentarios más antiguos
Hello
I have an equation like a*(x1^2)+ b(x2^2)+c((x1-x2)^2)+d((x12)^2)=1. Here I have variables of x1, x2, x12. x12 is the variable in the first quardrant. I have data of 12 Points passing through x1, x2 and x12.

I tried fitting the data to the above equation with different ways. But it did not turned out good. I tried with custom equation and some other methods. Could someone help me with getting the coefficients to this equation.
12 comentarios
Torsten
el 28 de Sept. de 2018
Not clear what you are trying to do.
Jay
el 28 de Sept. de 2018
Jay
el 28 de Sept. de 2018
Torsten
el 28 de Sept. de 2018
Could you write down the function/relation depending on x and y ?
Jay
el 28 de Sept. de 2018
Torsten
el 28 de Sept. de 2018
Sorry, I still don't understand what x12 is.
Given points (-5,-8), (-3,7), (4,6) and (9,-12).
What relations do you want to hold for these 4 points ?
a*(-5)^2+b*(-8)^2+c(-5+8)^2+d*??=1
a*(-3)^2+b*(7)^2+c(-3-7)^2+d*??=1
a*(4)^2+b*(6)^2+c(4-6)^2+d*??=1
a*(9)^2+b*(-12)^2+c(9+12)^2+d*??=1
Image Analyst
el 28 de Sept. de 2018
Are you trying to fit an ellipse to the data? FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_fit_an_ellipse_or_other_shape_to_a_set_of_XY_data.3F
Jay
el 28 de Sept. de 2018
Respuesta aceptada
Más respuestas (1)
Pratik Bajaria
el 28 de Sept. de 2018
0 votos
4 comentarios
Jay
el 28 de Sept. de 2018
Pratik Bajaria
el 28 de Sept. de 2018
Hello,
Go through this example --> (https://in.mathworks.com/help/curvefit/custom-nonlinear-models.html), probably it can help.
Regards, Pratik
Jay
el 28 de Sept. de 2018
Pratik Bajaria
el 29 de Sept. de 2018
Well all equations can be written in y=f(x). Take any of the variables to be y (let's say x12) and all the other variables can be x. Since you have data points available try to write x12=f(x1,x2) and it must work.
Regards.
Categorías
Más información sobre Linear Least Squares en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!