发布网友 发布时间:2022-04-22 05:25
共1个回答
热心网友 时间:2023-06-29 16:44
[x,y,z]=sphere(50);
X=30*x;
Y=30*y;
Z=30*z;
figure(1)
surf(X,Y,Z);
I=find(abs(Z)>4&abs(Z)<6);%Z=5
J=find(abs(Z)>14&abs(Z)<16);%Z=15
X1=X(I);Y1=Y(I);
X2=X(J);Y2=Y(J);
figure(2)
plot(X1,Y1,X2,Y2)
axis([-30 30 -30 30])
axis equal