How to shade a portion of a graph
조회 수: 51 (최근 30일)
이전 댓글 표시
How can I shade under the curve, and after x=1.25?
x=[-3:.1:3]; %
Y=normpdf(x,0,1);
plot(x,Y,'b')
xlim([-3 3])
ylim([0 0.4])
hold on
index=[1.25:3] %area i want shaded
fill(x,Y,index,'g')
댓글 수: 0
채택된 답변
David Hill
2022년 3월 5일
x=[-3:.1:3]; %
Y=normpdf(x,0,1);
plot(x,Y,'b')
xlim([-3 3])
ylim([0 0.4])
hold on
area(x(x>=1.25),Y(x>=1.25),0,'EdgeColor','none','FaceColor','b')
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Interpolation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!