フィルターのクリア

How can I calculate and plot rayleigh scattering equation?

4 ビュー (過去 30 日間)
Burak
Burak 2013 年 4 月 5 日
hi, I want to plot and calculate rayleigh equation.I wrote it , calculated and plotted.But it does not match the graph in my book.Here is my code.Thx for your help.
clear all
freq=6.*10.^8;
omeg=2.*pi.*freq;
eps0=(10.^-9)./(36.*pi);
mu0=4.*pi.*10.^-7;
k=omeg.*sqrt(eps0.*mu0);
lambda=2.*pi./k;
R=0.01:0.00366:0.07957;
N_cut=20;
for n=1:N_cut
hankel2(n,:)=sqrt(pi*k*R).*besselh(n+0.5,1,k*R);
hankel2der(n,:)=-
n.*sqrt(pi.*k./(2.*R)).*besselh(n+0.5,2,k.*R)+k.*sqrt(pi.*k.*R./2).*besselh(n-
0.5,2,k.*R);
A_e(n,:)=(((-1).^n)).*(2.*n+1)./(hankel2(n,:).*hankel2der(n,:));
end
Ae=sum(A_e,2);
f_Ae=((lambda.^2)./(4.*pi)).*(abs(Ae)).^2;
figure
plot(R,f_Ae)
grid on
  2 件のコメント
Ahmed A. Selman
Ahmed A. Selman 2013 年 4 月 5 日
Please use formatted syntax, clarify the specific equation you want to plot, and it would be helpful for anyone if you could refer to the (graph in your book) with something on the internet for comparison of what this nicely-written code produces. At least, mention the book you are referring to. I've copied the code to my editor, and couldn't see why is it not working for you. If you clarified it better, someone could properly assist you.
Burak
Burak 2013 年 4 月 5 日
my book is Time-Harmonic Electromagnetic Fields Syracuse University (McGraw-Hill Electrical and Electronic Engineering Series).page 295 and this is my eq. http://i45.tinypic.com/vnz2c3.jpg thanks for help.

サインインしてコメントする。

採用された回答

Youssef  Khmou
Youssef Khmou 2013 年 4 月 5 日
編集済み: Youssef Khmou 2013 年 4 月 5 日
hi, How is the graph you are expecting ? i altered the oscillating frequency to F=6Ghz . take a look at this code , and try also with f=6E+8 Hz ( the original freq you posted ), N_cut is augmented to 200 points .
clear all
freq=6.*10^9; % 6 GHz
omeg=2.*pi.*freq; % Angular frequency in RAD/Second
eps0=(10.^-9)./(36.*pi); % Absolute permittivity in FARAD/Meter
mu0=4.*pi.*10.^-7; % Absolute permeability
k=omeg.*sqrt(eps0.*mu0); % Wave Vector
lambda=2.*pi./k; %wavelength in Meter
N_cut=200;
R=linspace(0.01,0.07957,N_cut); % Radius....
for n=1:N_cut
hankel2(n,:)=sqrt(pi*k*R).*besselh(n+0.5,1,k*R);
A=-n.*sqrt(pi.*k./(2.*R)).*besselh(n+0.5,2,k.*R);
B=+k.*sqrt(pi.*k.*R./2).*besselh(n-0.5,2,k.*R);
hankel2der(n,:)=A+B;
A_e(n,:)=(((-1).^n)).*(2.*n+1)./(hankel2(n,:).*hankel2der(n,:));
end
Ae=sum(A_e,2);
f_Ae=((lambda.^2)./(4.*pi)).*(abs(Ae)).^2;
figure,plot(R,f_Ae),grid on
figure, plot(R,f_Ae), grid on, axis([0.01 0.02 0 0.012])
  2 件のコメント
Burak
Burak 2013 年 4 月 6 日
Really thanks it worked at 6 GHz and graph looks like what I want.my graph should've looked like this (<http://i48.tinypic.com/2vkc2gn.jpg>) and now it matches.God bless you :)
Youssef  Khmou
Youssef Khmou 2013 年 4 月 6 日
ok nice.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by