Borrar filtros
Borrar filtros

Is "polyarea" the same as "trapz" for calculating area under the curve?

2 visualizaciones (últimos 30 días)
to find the area of enclosed polygon (or any shape), which works best? polyarea or trapz?
  3 comentarios
J K
J K el 10 de Abr. de 2013
my prof gave us hint, to calculate the area enclosed, you need to take to forward area subtracted by the backward area. And it is under "trapz"
can you write the code for that?
J K
J K el 10 de Abr. de 2013
But I don't understand the 'idx' term. the_area = trapz(x(1:idx),y(1:idx))-trapz(x((idx+1):end),y((idx+1):end)
Plz help

Iniciar sesión para comentar.

Respuestas (1)

Veronica Maria Rodriguez Betancourtt
According to ChatGPT, polyarea uses the Shoelace Theorem.

Categorías

Más información sobre Numerical Integration and Differentiation 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