Cummulative numerical integral using integral function

1 visualizzazione (ultimi 30 giorni)
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!

Risposte (0)

Categorie

Scopri di più su Numerical Integration and Differential Equations in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by