gusucode.com > matlab通信工程仿真源码(张德丰等编著)程序书籍 > matlab_code/matlab通信工程仿真源码(张德丰等编著)/第4章/li4_26.m
%两个等直径圆管的交线 m=35; z=1.5*(0:m)/m; r=ones(size(z)); the=(0:m)/m*2*pi; x1=r'*cos(the); y1=r'*sin(the); %生成第一个圆管的坐标矩阵 z1=z'*ones(1,m+1); x=(-m:2:m)/m; x2=x'*ones(1,m+1); y2=r'*cos(the); %生成第二个圆管的坐标矩阵 z2=r'*sin(the); surf(x1,y1,z1); %绘制竖立的圆管 axis equal;axis off; hold on; surf(x2,y2,z2); axis equal;axis off; title('两个圆管的交线'); hold off;