Display the formula of a fitted model with its coefficient values
2 views (last 30 days)
Show older comments
I have an sfit model from a 5 degrees polynomial fit of a surface.
The formula for the object is of the form:
p00 + p10*x + p01*y + p20*x^2 + p11*x*y + p02*y^2 + p30*x^3
+ p21*x^2*y + p12*x*y^2 + p03*y^3 + p40*x^4 + p31*x^3*y
+ p22*x^2*y^2 + p13*x*y^3 + p04*y^4 + p50*x^5 + p41*x^4*y
+ p32*x^3*y^2 + p23*x^2*y^3 + p14*x*y^4 + p05*y^5
I would just like to display (as a character string) the formula but with its coefficients values instead of their names (that is 19.33 instead of p00, and so on..). In the sfit methods i only found methods to either display the formula in literal form or the coefficients values but not both at the same time.
Is there any possibility to do so?
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Linear and Nonlinear Regression 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!