I would like to know how i can calculate the sum of a curve

1 回表示 (過去 30 日間)
Iasonas Vasios
Iasonas Vasios 2021 年 3 月 23 日
コメント済み: Iasonas Vasios 2021 年 3 月 24 日
I need help on guiding me how i am going to calculate the following equation:
This is the mean x-ray photon fluence per unit DAK. I have my x-ray spectrum and i would like to calculate the φ0. I use trapz but the answer i get it is not right (maybe my spectrum isn't the exact as the paper's one. Also the following step is to calculate this equation where i think trapz is not going to help me:
I will attach my excel data in case they are going to help you understand what i am asking.
  1 件のコメント
Iasonas Vasios
Iasonas Vasios 2021 年 3 月 23 日
Some terms in the equation are coefficients , so if anyone answers this just give me the general idea and guidlines

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

採用された回答

David Hill
David Hill 2021 年 3 月 23 日
If you load your two columns. Making E the first column and phi0 the second column. dE is 0.5
deltaE=0.5;
meanFluence=sum(phi0*deltaE);%just a descrete sum (I got:6.5710e+03)
g1=%similarly, although I don't know what the other terms are (dSe, u(E), uen(E))
  1 件のコメント
Iasonas Vasios
Iasonas Vasios 2021 年 3 月 24 日
Thank you very much for your help. The other terms are coeffiecients that are given in the paper.
The asnwer you get is the excact as function trapz calculates but your answer helped me very much.

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

その他の回答 (1 件)

William Rose
William Rose 2021 年 3 月 24 日
I assume column D of the workbook you attached is the data.
The spacing, , is 0.5 keV for all samples.
Assunming you have read the data in from the spreadhseet into variable phi0E:
deltaE=0.5;
phi0bar=sum(phi0E)*deltaE;
So if you just add up all the values that is not the right answer? What IS the right answer and what is the source of that right answer?
  1 件のコメント
Iasonas Vasios
Iasonas Vasios 2021 年 3 月 24 日
The right answer comes from the attached paper. The answer you giving me is going to work i think yes. The difference between the result i get and the paper's one is because of the slightly different x-ray spectrum that i generate. I can't generate the excact one as in the paper.
Thank you for your interest

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

カテゴリ

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