Area between two points and a curve

Hi All,
I want to find the area between a curve and two points. The equation is:
>> syms x
>> x4=1.18:0.0000001:3;
>> y4=-2*exp(-(x4).^2);
>> graph4= plot(x4,y4);
I want the area to the left hand side! points: (1.18,-0.5) and (1.18,0).
Any thoughts?
Thank you
Auntitled.jpg

 Respuesta aceptada

Stephan
Stephan el 30 de Dic. de 2018
Editada: Stephan el 30 de Dic. de 2018

0 votos

Hi,
the whole area of your figure is a rectangle with area: (3-1)*(0-(-0.5).
If you calculate the integral of your curve in the bounds f(×)=-0.5 (find corresponding x (=1.18(?))) and x=3, you can subtract both values from eachother and you get the green marked area.
Best regards
Stephan

2 comentarios

Bristol19
Bristol19 el 30 de Dic. de 2018
Briliant Stephan,
It was a massive help! Thank you
Happy new year in adance! :-)
H
Stephan
Stephan el 30 de Dic. de 2018
please make sure to accept useful answers.

Iniciar sesión para comentar.

Más respuestas (1)

madhan ravi
madhan ravi el 30 de Dic. de 2018
Editada: madhan ravi el 30 de Dic. de 2018

0 votos

1 comentario

Bristol19
Bristol19 el 30 de Dic. de 2018
Hey Madhan,
Thank you but I could not follow the same way they did it. As I only have one function(curve).
Thank you
H

Iniciar sesión para comentar.

Categorías

Preguntada:

el 30 de Dic. de 2018

Comentada:

el 30 de Dic. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by