个性化阅读
专注于IT技术分析

MATLAB函数plot3()

plot3函数显示一组数据点的三维图。

句法

plot3(X1, Y1, Z1, ...) // where X1, Y1, Z1 are vectors or matrices, plot one or more lines in 3-D space through the points whose points are the items of X1, Y1, and Z1.
plot3(X1, Y1, Z1, LineSpec, ...) // It develop and shows all the lines described by the Xn, Yn, Zn, LineSpec quads, where LineSpec is a line specification that define line style, marker symbol, and color of the plotted lines.
plot3(..., 'PropertyName', PropertyValue, ...) // It sets properties to the specified property values for all Line graphics objects generated by plot3.
h = plot3(...) // It returns a column vector of handles to line graphics objects, with one handle per line.

例子

参数空间曲线图:

x(t)=t, y(t)=t^2, z(t)=t^3.
0≤t≤1
t= linspace (0, 1, 100);
x=t; y=t.^2; z=t.^3;
plot3(x, y, z), grid
xlabel ('x(t)=t')
ylabel ('y(t)=t2')
zlabel ('z(t)=t3')

输出

MATLAB函数plot3()

赞(0)
未经允许不得转载:srcmini » MATLAB函数plot3()

评论 抢沙发

评论前必须登录!