Sir,I want to implment a function called kdistribution .I am nt understanding hw to giv input & cal the function x,plz help me.thank u & also tel me how to convert floating point values of mean to integr or unsignedint values.
1 view (last 30 days)
Show older comments
function [m,b,y]= kdist(x)
im=imread('D:\envisatcrop.tif');
imtool(im);
l=1;
v=1;
a=gamma(l);
b=gamma(v);
winsize=32;
r = 1;
[maxrows,maxcols]=size(im);
m=zeros(winsize,winsize);
k=floor(winsize/2);
for rownum = 1:maxrows
rowlowerbound = rownum - k;
rowupperbound = rownum + k;
if rowupperbound > maxrows
rowupperbound = maxrows;
end
if rowlowerbound < 1
rowlowerbound =1;
end
c = 1;
for colnum = 1:maxcols
collowerbound = colnum - k;
colupperbound = colnum + k;
if colupperbound > maxcols
colupperbound = maxcols;
end
if collowerbound < 1
collowerbound =1;
end
d=im(rowlowerbound:rowupperbound, collowerbound:colupperbound);
m (r,c)= mean2(d);
c=c+1;
end
r=r+1;
end
imtool(m);
imwrite(m,'D:\kdisenvisat.tif');
e=2*(sqrt(l*v*x/m));
f=besseli(-0.5,e);
plot(f);
y=(2/(x*a*b))*((L*v*x/m)^(L+v/2))*(f);
end
0 Comments
Answers (0)
See Also
Categories
Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!