Polinomial approximation of surface
Show older comments
I have a massive of [x y z] coordinates of points of some surface. I need to get the polynomial approximation of this surface. Standard Matlab function polyfit does not approach like others. I have found polyfitn (+ polyvaln) function via file exchange which applies to the similar task, but it does not satisfy me.
All the functions that I have found alloy to approximate surface with formula z = f(x,y), but I need to get f(x,y,z) = 0. Approximate polynomial will be like this:
A11*x^2 + A22*y^2 + A33*z^2 + A12*x*y + A13*x*z + A23*y*z + A1*x + A2*y + A3*z + A0 = 0;
in case of 2nd order. Can anyone help me?
1 Comment
dpb
on 14 Jun 2013
If you have the Statistics Toolbox, you can use the linear regression tool
doc linearmodel.fit
If not you can write the explicit model coefficient matrix and use the backslash operator to solve the least squares equations
doc mldivide
Accepted Answer
More Answers (0)
Categories
Find more on Get Started with Curve Fitting Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!