xyz.mat文件保存着我用eig计算得到的某阶阵型数据,见附件
- clc;
- clear
- load xyz.mat;
- y0=zeros(1,length(x));
- z0=zeros(1,length(x));
- plot3(x,y0,z0,'k-','LineWidth',3);
- hold on;
- plot3(x,y,z0,'b-','LineWidth',2);
- for i = 1:length(x)
- xx=[x(i),x(i)];
- yy=[y0(i),y(i)];
- zz=[z0(i),z0(i)];
- plot3(xx,yy,zz,'b-','LineWidth',2);
- alpha=0:pi/20:2*pi;
- R=y(i)-y0(i);
- Rx=ones(1,length(alpha))*x(i);
- Ry=R*cos(alpha);
- Rz=R*sin(alpha);
- plot3(Rx,Ry,Rz,'r-','LineWidth',2);
- end
- ylim([-3*max(abs(y)),3*max(abs(y))]);
- zlim([-3*max(abs(y)),3*max(abs(y))]);
- view(45, 45);
复制代码
|