shade area under curve - CDF plot

조회 수: 13 (최근 30일)
C Ryan
C Ryan 2017년 8월 21일
댓글: Star Strider 2017년 8월 21일
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

채택된 답변

Star Strider
Star Strider 2017년 8월 21일
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
C Ryan
C Ryan 2017년 8월 21일
Thank you. This is what I've been trying to do.
Star Strider
Star Strider 2017년 8월 21일
As always, my pleasure.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by