我无法匹配矩阵的大小。我正试图模拟Em波在具有电导率segma的介质中移动。问题是当我尝试绘制E和H字段时,它给了我一个错误(矩阵尺寸错过匹配)。我试图改变这些值,但仍然没有输出。如果有人帮我解决这个问题。提前致谢

segma=5

f=1000

m=2

w=2*pi*f ; % Omega

Eo= 8.854187817*10^12; %vaccum permitivity of air

y=(1+1i)*sqrt(pi*f*Eo*m*segma); % definning gamma

a=real(y)% definning alpha

b=imag(y);% defining beta

s=1/a;%skin depth

n=(1+1i)/segma*s;%characteristic impedance

vp=w*s; % phase velocity

lambda= 2*pi*s; % wavelength

t=0:1:100; % Time for analysis

z=0:1:100; % Range of Space under analysis

Ex=exp(-z*a)*cos(w*t-z*a); % assuming one component in the x-direction propagating in the +z direction . Also we have assumed E+=1

Hy=Ex/n; % Assuming one component in the y-direction

subplot(2,1,1)

plot(z,Ex,'g');

xlabel('z(metres)');

ylabel('Ex(E)');

title('Plane wave propagation in free space medium');

subplot(2,1,2)

plot(z,Hy,'r');

xlabel('z(metres)');

ylabel('Hy(H)');

更多推荐