https://github.com/SBIUCD/BDiffProt
Raw File
Tip revision: d08cfc4340c37feac5601cf801a5268ea088203d authored by SBIUCD on 12 May 2016, 10:42:40 UTC
Create README.txt
Tip revision: d08cfc4
datagenerator_rice_distribution.asv
function [d,I] = datagenerator_rice_distribution(m0,tau,s0,N,p,pms)
%mu0,tau,sigma,N,p
m1= m0+tau;
mu0=repmat(m0,N,1);
%size(mu0)
I=rand(N,1)<0.5;
mu1=mu0;
mu1(I)=mu0(I)+tau;
%mu1= mu0;
%mu1(I==1)=m11;
d=zeros(N,2*p);
d(:,1:p)=repmat(mu0,1,p)+sigma*randn(N,p);
d(:,p+1:2*p)=repmat(mu1,1,p)+sigma*randn(N,p);
d=exp(d);
X=sort(d(:),'ascend');
lth=min(d(:));
if pms~=0
    lth=X(ceil(length(X)*pms/100));
end
d(d<lth)=0;
end

back to top