Area in a normalpdf
3 次查看(过去 30 天)
显示 更早的评论
Dear Altruist,
I want to make such figure in MATLAB. My code is attached here. I want to shade the area like the red area in figure.
x1 = [-4:.1:4];
y1 = normpdf(x1,0,1);
plot(x1,y1)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1271075/image.png)
0 个评论
采纳的回答
Paul
2023-1-22
x1 = [-4:.1:4];
y1 = normpdf(x1,0,1);
x = [-4:0.1:-1.5];
plot(x1,y1)
hold on
area(x,normpdf(x,0,1))
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!