Effacer les filtres
Effacer les filtres

Area in a normalpdf

2 vues (au cours des 30 derniers jours)
Shariful Islam
Shariful Islam le 22 Jan 2023
Commenté : Shariful Islam le 22 Jan 2023
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)

Réponse acceptée

Paul
Paul le 22 Jan 2023
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))
See area for options for customization
  1 commentaire
Shariful Islam
Shariful Islam le 22 Jan 2023
Thanks a lot!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by