function p=RicerandWN(M,N,P,K) %function p=RicerandWN(M,N,P,K) scatter=P/(1.0+K); %mean value of scattered component dom=P-scatter; %mean value of dominant component p=(scatter*randn(M,N).^2+(scatter^.5*randn(M,N)+(2*dom)^.5).^2)/2; %mean value P; variance P^2*(1+2*K)/(1+K)^2