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
Jan 2022 年 7 月 9 日
This is the code. What is your question?
the cyclist
the cyclist 2022 年 7 月 9 日
The variable kl is not defined before it is used. Is that the problem?

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

製品

リリース

R2021a

タグ

質問済み:

2022 年 7 月 8 日

コメント済み:

2022 年 7 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by