Cummulative numerical integral using integral function

1 visualización (últimos 30 días)
mrish
mrish el 29 de En. de 2020
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!

Respuestas (0)

Categorías

Más información sobre Numerical Integration and Differential Equations en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by