Cummulative numerical integral using integral function

조회 수: 1 (최근 30일)
mrish
mrish 2020년 1월 29일
Hey all,
I want to calculate cummulative numeric integral using integral function (or quad function in old matlab version) and compare to results with cumtrapz.
However, this function don't work with vectors!
I want to do:
g(i) = integral((x)@myfunc,0,h(i)) where h=1:600e3.
note the function is the same in every case - this is not a function array.
I implemented it with a for loop but it takes a very long time and this is just one of the calculations I need to do...
Is there a more 'vectorial' way to implement it?
thanks in advance!

답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by