integration of number array with variable

3 ビュー (過去 30 日間)
Abu Nazir
Abu Nazir 2022 年 2 月 23 日
回答済み: Torsten 2022 年 2 月 23 日
T(ez) is a number array. is there anyone who can help me to do this integration?
  2 件のコメント
Torsten
Torsten 2022 年 2 月 23 日
Use trapz.
Abu Nazir
Abu Nazir 2022 年 2 月 23 日
I do have calculated 600 value of T(Ez) corresponding to Ez number array. EF1, EC1, EF2 and EC2 600 numerical value which I have.
I want to vary T - temperature and calculate the J.

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

回答 (1 件)

Torsten
Torsten 2022 年 2 月 23 日
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)

カテゴリ

Help Center および File ExchangeNumerical Integration and Differentiation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by