How to calculate the area under curve?

7 visualizaciones (últimos 30 días)
AS
AS el 27 de Mayo de 2021
Comentada: AS el 31 de Mayo de 2021
I have attached a curve in which x axis is time and y axis is amplitude. How to calculate the area under this curve.Please suggest me.

Respuesta aceptada

Torsten
Torsten el 27 de Mayo de 2021
area_under_curve= trapz(x,y)
  3 comentarios
Torsten
Torsten el 28 de Mayo de 2021
Editada: Torsten el 28 de Mayo de 2021
If the spacings between the x-values is 1, you can use trapz(y), else you must use trapz(x,y).
The fact that the two results are different indicates that the spacing is different from 1 in your case.
AS
AS el 31 de Mayo de 2021
Thank you so much.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by