MATLAB 错误?Error using ==> plot3 Vectors must be the same lengths.% M-file LD.m% LD单个仿真[x,y]=meshgrid([-40:0.1:39]);Wox=0.000001;Woy=0.000003;z=0.2;R=0.00000098;pi=3.1415926;k=2*pi/R;E=0;E=-k*1i*exp(k*z*1i)*Wox*Woy*(2*z-k*Wox^2*1i)^0.5*(2*

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/28 05:59:09
MATLAB错误?Errorusing==>plot3Vectorsmustbethesamelengths.%M-fileLD.m%LD单个仿真[x,y]=meshgrid([-40:0.1:39]

MATLAB 错误?Error using ==> plot3 Vectors must be the same lengths.% M-file LD.m% LD单个仿真[x,y]=meshgrid([-40:0.1:39]);Wox=0.000001;Woy=0.000003;z=0.2;R=0.00000098;pi=3.1415926;k=2*pi/R;E=0;E=-k*1i*exp(k*z*1i)*Wox*Woy*(2*z-k*Wox^2*1i)^0.5*(2*
MATLAB 错误?Error using ==> plot3 Vectors must be the same lengths.
% M-file LD.m
% LD单个仿真
[x,y]=meshgrid([-40:0.1:39]);
Wox=0.000001;
Woy=0.000003;
z=0.2;
R=0.00000098;
pi=3.1415926;
k=2*pi/R;
E=0;
E=-k*1i*exp(k*z*1i)*Wox*Woy*(2*z-k*Wox^2*1i)^0.5*(2*z-k*Woy^2*1i)^0.5;
I=E*inv(E);
plot3(x,y,I);
surfc(x,y,I)
grid on

MATLAB 错误?Error using ==> plot3 Vectors must be the same lengths.% M-file LD.m% LD单个仿真[x,y]=meshgrid([-40:0.1:39]);Wox=0.000001;Woy=0.000003;z=0.2;R=0.00000098;pi=3.1415926;k=2*pi/R;E=0;E=-k*1i*exp(k*z*1i)*Wox*Woy*(2*z-k*Wox^2*1i)^0.5*(2*
错误提示是说x,y,l三个变量要有相同的长度,长度不一致是不行的.