plot eff vs F for lucky drift
이전 댓글 표시
clc;
W1 = 0.5;
e = 1.6*10^-19;
Ea = 2.3;
Er = 0.04;
Eg = 2;
Ei = 0.55;
F = 0:150;
lambda_el = 0.6;
lambda_ie = 6 * lambda_el;
theta_c = pi/2;
alpha = 0;
for m=0:5000
for ku=0:5000
Ea = (kl*e*F*lambda_el*cos_theta)+(ku*e*F*lambda_el*cos_theta_star)-(m*Er);
cos_theta = (1 + cos(theta_c))/2;
cos_theta_star = (cos(theta_c)-1)/2;
x = ((k*(1-W1))^ku)* exp(-k*(1-W1))/ factorial(ku);
y = ((k*lambda_el/lambda_ie)^m)*exp(-k*lambda_el/lambda_ie)/factorial(m);
k = kl + ku;
l_k = lambda_el*(kl*cos_theta) + (ku*cos_theta_star);
alpha = alpha + ((x*y)/l_k);
end
end
disp("Alpha")
disp(alpha)
d = 10;
eff = exp(d*alpha);
disp("Efficiency")
disp(eff)
disp("F")
disp(F)
disp("kl")
disp(kl)
figure
plot(F,eff)
댓글 수: 2
Jan
2022년 7월 9일
This is the code. What is your question?
the cyclist
2022년 7월 9일
The variable kl is not defined before it is used. Is that the problem?
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!