how can Write matlab code for CDF and PDF

hi,
I want to write the code for pdf and cdf describe here http://snag.gy/9Fbt3.jpg please have a look Looking forward Thanks

 采纳的回答

temp1=cumsum(cl)/sum(cl);
temp2=cumsum(cr)/sum(cr);
temp3=floor(256*temp1);
temp4=floor(256*temp2);
a=I;a2=a;
for i=0:255
if i<m1
a2(I==i)=m1*temp1(i+1);
else
a2(I==i)=m1+(max(I(:))-m1)*temp2(i+1);
end
end

更多回答(1 个)

Can you provide more information? What random numbers are you working with?
Take a look at all the supported distributions. All the common PDF and CDFs are already available.

2 个评论

numbers you can use like 0:255, http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=580378 is the paper that I am trying to implement but I am sure I am not coding very well, and I think Matlab built in Distribution may not applicable, Infact I Also dont Want to Use MAtlab built-in to build understanding of equations and how to code them, Sorry I am newbie.
please let me know if you can not download the paper

请先登录,再进行评论。

Community Treasure Hunt

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

Start Hunting!

Translated by