plotting the density function and cumulative distribution function?

2 views (last 30 days)
After a series of investigation, the lateral resisrance of a small building frame is to found be randomly distributed with the following probability density function, fR(r):
fR(r)= (3/500)*(r-10)*(20-r)
10 <= r <= 20
=0 elswhere
how can we plot the density function fR(r) and cumulative distribution function FR(r)?

Accepted Answer

Wayne King
Wayne King on 3 Mar 2013
r = 10:0.01:20;
FR = -(r.*(r.^2-45*r+600))/500+5;
% PDF
fR= (3/500)*(r-10).*(20-r);
% CDF
FR = -(r.*(r.^2-45*r+600))/500+5;
subplot(211)
plot(r,fR); title('PDF');
subplot(212)
plot(r,FR); title('CDF');

More Answers (0)

Community Treasure Hunt

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

Start Hunting!