matlab矩阵左右维度不匹配,matlab矩阵大小不匹配

我无法匹配矩阵的大小。我正试图模拟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)');

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值