integration of number array with variable
Show older comments
Answers (1)
Torsten
on 23 Feb 2022
Ez=...;
TEz = ...;
q=...;
mstar=...;
h=...;
kB=...;
T=...;
J = zeros(size(T));
for i = 1:numel(T)
Y = TEz.*log((1+exp((EF1-Ez-EC1)/(kB*T(i))))./(1+exp((EF2-Ez-EC2)/(kB*T(i)))));
J(i) = q*mstar/(2*pi^2*h^3)*kB*T(i)*trapz(Ez,Y);
end
plot(T,J)
Categories
Find more on Numerical Integration and Differentiation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!