MATLAB: Fill below function fplot

fplotgraphmatlab function

How to fill the area below this Beta density, between x=0 and x=0.5.
% fplot(@(x) betapdf(x,a_beta,b_beta),[0 1],'b');

Best Answer

Madan's comment amplified...
fnF=@(x) betapdf(x,a_beta,b_beta);
figure
fplot(@(x) betapdf(x,a_beta,b_beta),[0 1],'b');
hold on
x=linspace(0,0.5);
area(x,fnF(x))
Related Question