Plot 3d graph with equation and variables
Show older comments
I have a function
ypred = 0.3969 - 0.0531*x1 -0.1386*x2 +0.0803*x1.^2 -0.0301*x2.^2 -0.0808*(x1.*x2)
the x1 and x2 values are:
x1 = [0;1;0.5;-0.5;-1;-0.5;0.5]
x2 = [0;0;0.866;0.866;0;-0.866;-0.866]
I plotted the graph using the code attached. This code doesn't seem to work that well because I tried for the same code on a graph that was previously obtained using the equation
ypred = 265 - 167.6*x1 -35.8*x2 +102.9*x1.^2 +47.9*x2.^2 +25.9*(x1.*x2)
It has a minimum point at 0.7940,0.1621. This is not obtained using the code..And the graph doesn't seem right either..
Accepted Answer
More Answers (0)
Categories
Find more on Networks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!