我想在同一图中绘制两架飞机,我该怎么做?
x + y + z = 1
2x - y + 3z = 4
谢谢!
答案 0 :(得分:7)
显示平面的x
和y
范围:
X = linspace(-100,100,10);
Y = linspace(-100,100,10);
[ XX, YY ] = meshgrid(X,Y);
计算飞机的z
坐标:
ZZ1 = 1 - XX - YY;
ZZ2 = 4/3 - 2/3 * XX + 1/3 *YY;
显示:
figure;
hold on;
mesh(XX,YY,ZZ1);
mesh(XX,YY,ZZ2);