矩阵维度必须与jexact一致

时间:2014-08-28 00:58:53

标签: matlab

我试图对Mie系列的jexact进行编码,但它说“Matrix尺寸必须同意。 该如何修复?

%wave_length
lamda = 2*pi/3.5;
%speed of light
c = 299792458;
%frequency
freq = c/lamda;
%Raduis
R = 1;
 %Permeability
mu = 4.0e-7*pi;
%permittivity
epsilon = 1.0/c/mu/c;
% radian frequency (w)
w = 2.0*pi*freq;
% wavenumber
K = w*sqrt(mu*epsilon);
omega=2*pi*(0:N-1)/N;
x=cos(omega)*R;
y=sin(omega)*R;
phi =  atan2(y,x);
Jexact    = zeros(size(x)); 
for   nu = -10:10;

Jexact= Jexact + (1j.^(-nu).*exp(1j*nu*phi)./besselh(nu,2,K*R))*(-2/(w.*mu.*pi.*R));
end

0 个答案:

没有答案