Trouble formulating minimization problem
Mostrar comentarios más antiguos
I have the following minimization problem that I am trying solve in Matlab, but just not coming up with the right way to formulate it.
Given an image matrix V, I need to minimize the error function (not in Matlab format)
error = ∑ ( V(x,y) - f(x,y) )^2, summed over 1600 points (x,y)
where f(x,y) = P1 * x^2 + P2 * y^2 + P3 *x*y + P4*x + P5*y + P6
The goal is to determine the P1-P6 values. Any help would be greatly appreciated.
Keith
Respuesta aceptada
Más respuestas (1)
There is also this FEX file
which takes care to use QR factorizations, similar to polyfit.
1 comentario
Keith
el 21 de Jun. de 2013
Categorías
Más información sobre Matrix Indexing 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!