Which numerical integral equation is correct?

조회 수: 1 (최근 30일)
Szabó-Takács Beáta
Szabó-Takács Beáta 2019년 6월 21일
I would have a question in connection with numerical integration in Matlab R2015b. I would like to integrate the ceilometer measured attenuated backscatter coefficient. The spatial range of backscatter coefficioent is 10 m. I should calculate the following equation:
where dz is the range (dz = 10) and β is the backscatter coefficient. The backscatter coefficient values are in range x time matrix. I tried to calculate the integral value in two different ways.
First is:
X = repmat(0,size(BS))
for j = 2:400
X(j,1)=10.*(BS(j-1,1)+BS(j,1)).*0.5+X(j-1,1);
end
X_sum = sum(X);
The second is:
TR = cumtrapz(BS);
TR_sum = sum(TR);
The resulted X and X_sum are one order of magnitude larger than TR and TR_sum. Could someone write me which calculation is correct?
Thank you for your help in advance!

답변 (0개)

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

제품


릴리스

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by