how can Write matlab code for CDF and PDF

4 visualizzazioni (ultimi 30 giorni)
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

Risposta accettata

Muhammad Ali Qadar
Muhammad Ali Qadar il 16 Set 2013
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

Più risposte (1)

Shashank Prasanna
Shashank Prasanna il 11 Set 2013
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 Commenti
Muhammad Ali Qadar
Muhammad Ali Qadar il 11 Set 2013
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.
Muhammad Ali Qadar
Muhammad Ali Qadar il 11 Set 2013
please let me know if you can not download the paper

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by