PDA

View Full Version : Mathematic surfers



Colx007
20th May 2008, 21:17
Hi,

I try to build an algorithm to make mathematic functions from (x, y, z) data. I could do it but only whit planes (or flat… pardon my English please). But when I want to do a surface with bigger degree, the function is unstable.

I was working with c++ and the mathematic method is least square => (At*A)-1*At*B = u; where A is a matrix whit arrange from X and Y data, B is a vector that content Z data and “u” is a vector that have polynomial coefficients.
E.g.
Z(X,Y) = a + b*X + c*Y + d*X*Y + …..

u = (a, b, c, d, …., n) =?

But this method is unstable because need a inverse matrix, and is possible that the matrix can’t be inverted.

Does QT anyone class to build mathematics function (Z(X,Y)) from x,y,z data? Or Someone has any idea where I can found help?

Thank you very much.

Best regard

marcel
20th May 2008, 21:57
Are you talking about curve fitting?
You could do a search about that... There are a few examples on the internet an if I'm not mistaking, even some libs.