0

How to plot a 3d graph of a quadratic funciton. Here is my code for the 2D plot is there anyway to adapt it for a 3d code ?

z = (startv2:step:endv2);
y = (a2.*(z.^2))+(b2.*z)+c2;
plot(z,y);
text(value1,0, ['X1 = ',num2str(value1),' ']);
text(value2,0, ['X2 = ',num2str(value2)]);
grid
4

1 回答 1

1

这些 MATLAB 函数可能会有所帮助:

plot3

或者

contour3

或者

surf

取决于你想展示什么。MATLAB 帮助(单击上面的函数)包含所有这些函数的示例。

于 2013-05-09T14:04:52.950 回答