how can i solve numerically a vector integral?

조회 수: 1 (최근 30일)
Adi
Adi 2019년 1월 15일
댓글: Adi 2019년 1월 16일
I have a plot of gaussian alike profile in matlab.
the plot presents the intensity (I) profile( E^2) as a function of location(radius) r.
i need to calculate the integral of I(r)*r*dr which is the area under the graph, i tried solving with trapz but the answer isnt correct, so how can i calculate this integral when
I(r) is a vector and r is a value i know?plot.PNG
  댓글 수: 5
Torsten
Torsten 2019년 1월 16일
As I wrote,
trapz(r_vector,r_vector.*intensity_vector)
if you want to approximate
integral(I(r)*r*dr )
Adi
Adi 2019년 1월 16일
thank you!

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by