How to take integral with for loop?

4 visualizaciones (últimos 30 días)
Arya Akhtar
Arya Akhtar el 24 de Mayo de 2021
Comentada: Arya Akhtar el 25 de Mayo de 2021
Hello,
I would like to integrate my function with for loop.
for l = 1: length(x)-1
final(l) = (upper(i+1)-upper(i)).*(w(2)-w(1)) ;
end
where x is my function and l is my time. i cannot have desired output. how can i do that?

Respuesta aceptada

Alan Stevens
Alan Stevens el 25 de Mayo de 2021
Add the command
I = sum(final);
after the loop.

Más respuestas (0)

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by