Clear Filters
Clear Filters

How can i find parameter in loops according to calculation result ?

1 view (last 30 days)
Here is my code
syms E Eg V g;
z=[ ];
y=[ ];
c=3 .*(10.^8);
h=4.1361e-015;
k=8.62E-5;
Tc=300;
for Ei=0.5:.05:0.6
z=[ ];
for Eg=1.4:0.01:1.75;
Ec=Eg-Ei;
a = quad( @(E)(E.^2) ./ (exp(E./0.5172)-1), Eg , 100);
aa= quad( @(E)(E.^2) ./ (exp(E./0.5172)-1), Ec , Eg);
for Ucv=Eg-.2:.005:Eg-.01;
b = quad(@(E)(E.^2) ./ (exp(( E-Ucv )./0.0259)-1),Eg,100);
for Uiv=Ei-.1:.005:Ei-.01;
Uci=Ucv-Uiv;
Pin=(2.*pi().^5.*(k.*6000).^4)./(15.*h.^3.*c.^2) ; % SQ_model;
bb= quad(@(E)(E.^2) ./ (exp(( E-Uci )./0.0259)-1),Ec,Eg);
if abs(quad( @(E)(E.^2) ./ (exp(E./0.5172)-1), Ei , Ec)- quad(@(E)(E.^2) ./ (exp(( E-Uiv )./0.0259)-1),Ei,Ec)-...
aa+bb) <= 10^-4
P = ( 2.*pi().*Ucv./6.3682e-027 ) .* ( a + aa - b - bb ) ./ Pin ;
z = [z P]
m = max(z)
end
end
end
end
y=[y m]
end
result is
y =
0.6025 0.6137 0.6241
I want to get Ei,Eg,Ucv and Uiv which parameter in loops calculate result y is 0.6137 .
thank you :)

Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!