Plot 3d graph with equation and variables
显示 更早的评论
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..
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Networks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!