How to apply integration ? Error in applying integration?
1 view (last 30 days)
Show older comments
In my code the resulting plot is as the following:

but it should be as the dashed line in the following image and correspond to (6) in Yaxis in my matlab plot:

and here is my code :
if true
clc; clear; close all;
mec2=(0.511e+6)/26.26;
%m=1;
%eelec=1; %electric charge
h=1; % reduse Bohr constnt
z=6;
%vo=1;
a=5156.2/(26.26).^3; %fitting parameter
b=23.70/26.26; %fitting parameter
c=15.24/26.26; %fitting parameter
roo=2.253; %the density of the medum
A=12; %the atomic number
Na=6.022e+23; % Avogadro`s Number
N=((Na*roo)/A)*(0.529^3)*1.0e-24; %right
mpc2=931.4;
y1=1/(2*(pi^2))*N;
wp=28.28*sqrt((roo*z)/A)/26.26;
spedLi=3.0e+8;
gama=14/26.26; ii=0;Er=0; ki=0;
w=0.001:0.25:600;
for w=0.001:0.025:600; x=0; %the energy
Er=w/931.4; %w*1.0e-3/mpc2;
Bb=(Er*(2+Er))/((1+Er)^2);%Er*(2+Er)/(Er+1)^2;
v=(sqrt(Bb))*(spedLi/(2.185e+6));
Emax=2*(v^2);
x1=Emax;
%FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
Lo=x1-x;
reo=Lo/100;
w1=w:reo:x1;
y=(a*w1)./((w1.^2-b^2).^2+c^2.*w1.^2); %*w1;
% uu=int(y)*w1
%syms w
%g=int(y,w,x,Emax);
L=sum(y)*reo;
%FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
ii=ii+1;
wfomeg=(2/pi)*((pi/2)-atan((x*1000/26.26)/gama)); %wfomeg=(wp^2)*((pi/2)-atan(w/gama));
eff(ii)=(y1*L)+wfomeg;
end
w=0.001:0.025:600;
semilogx(w,eff); %plot(w,eff(ii));
xlabel('w');
ylabel('N_e_f_f');
end
what should I do to get right plot, I use matlab 2017 and windows2010
any help will appreciated...
1 Comment
Karan Gill
on 17 Jan 2018
If you have specific questions, we can help. But this forum is not meant for solving homework problems.
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!