How to calculate area of space in Matalb

1 visualización (últimos 30 días)
Tran Hoa
Tran Hoa el 10 de Oct. de 2018
Comentada: Tran Hoa el 14 de Oct. de 2018
Dear members, I want to calculate area of space created by 4 lines as figure. Could you help me to do that ? Thank you
  4 comentarios
Image Analyst
Image Analyst el 10 de Oct. de 2018
Is line #1 the blue curve, or the black top of the axes box?
Tran Hoa
Tran Hoa el 11 de Oct. de 2018
Is the blue curve. Thank

Iniciar sesión para comentar.

Respuesta aceptada

Image Analyst
Image Analyst el 11 de Oct. de 2018
Try stacking the numerical row vectors of the curves vertically using a semicolon then use min() to get the lower-most curve:
bottomCurve = min([curve1; curve2; curve3; curve4; curve5; curve6], 1);
Then sum from the left index to the right index, whatever they are.
areaUnderCurve = sum(bottomCurve(index1 : index2))

Más respuestas (0)

Categorías

Más información sobre Solver Outputs and Iterative Display 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