How can I calculate and plot rayleigh scattering equation?

A
Amolisharma · Sep 12, 2020 · 2.4K views
Question
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
Expert Answer
Profile picture of John Michell
John Michell PhD Expert
Answered Aug 24, 2026

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])
100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!