How to shade a portion of a graph
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Kyle Langford
am 5 Mär. 2022
Kommentiert: Kyle Langford
am 5 Mär. 2022
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 Kommentare
Akzeptierte Antwort
David Hill
am 5 Mär. 2022
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')
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Curve Fitting Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!