shade area under curve - CDF plot

11 visualizaciones (últimos 30 días)
C Ryan
C Ryan el 21 de Ag. de 2017
Comentada: Star Strider el 21 de Ag. de 2017
Hi, I'm looking to shade/fill the area under the curve on a cdf plot. This is fairly simple when plotting x,y data using the area or fill function. However, I cant find a way to do it when plotting a cdf as you only use one column of data to construct the plot. Any help would be much appreciated.
Best regards, Ciara

Respuesta aceptada

Star Strider
Star Strider el 21 de Ag. de 2017
I don’t understand what the problem is.
Try this:
mu = 1;
sd = 2;
x = linspace(mu-10*sd, 1.96);
CDF = normcdf(x, mu, sd);
figure(1)
area(x, CDF)
  4 comentarios
C Ryan
C Ryan el 21 de Ag. de 2017
Thank you. This is what I've been trying to do.
Star Strider
Star Strider el 21 de Ag. de 2017
As always, my pleasure.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots 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