plotting the density function and cumulative distribution function?
3 次查看(过去 30 天)
显示 更早的评论
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)?
0 个评论
采纳的回答
Wayne King
2013-3-3
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');
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!