function yi()
%读入x1轴,y1的数据
X= xlsread('天线电流幅度和相位 (天线沿x轴移动) 2.0个波长.xls',1,'b3:b66');
Y1= xlsread('天线电流幅度和相位 (天线沿x轴移动) 2.0个波长.xls',1,'c3:c66');
[MX,NX] =size(X);
[MY,NY] = size(Y1);
X11 = reshape(X,1,MX * NX);
Y11 = reshape(Y1,1,MY * NY);
plot(X11,Y11,'diamond','linestyle','-');
hold on ;
%读入x2轴,y2的数据
Y2= xlsread('天线电流幅度和相位 (天线沿x轴移动) 2.0个波长.xls',1,'D3:D66');
[MX,NX] =size(X);
[MY,NY] = size(Y2);
X22 = reshape(X,1,MX * NX);
Y22 = reshape(Y2,1,MY * NY);
plot(X22,Y22,'diamond','linestyle','-');
hold on;
%读入x3轴,y3的数据
Y3= xlsread('天线电流幅度和相位 (天线沿x轴移动) 2.0个波长.xls',1,'e3:e66');
[MX,NX] =size(X);
[MY,NY] = size(Y2);
X33 = reshape(X,1,MX * NX);
Y33 = reshape(Y3,1,MY * NY);
plot(X33,Y33,'r+','linestyle','-');
title('双曲线');
xlabel('X坐标轴');
legend('曲线1','曲线2','曲线3');
hold off;
matlab 读 excel数据并显示
最新推荐文章于 2024-07-17 11:05:20 发布