Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: random variablesrayleigh distribution
Posted:
Jan 10, 2013 1:37 PM


"maryam" wrote in message <kcm0ul$ku$1@newscl01ah.mathworks.com>... > I want add a clutter model with rayleigh distribution by random command to a 100by40 A matrix, > but I just want to add this distribution to matrix from 0th row to 10th row and 50th row to 70th and 90th row to 100th.           In matlab the zeroth row is not allowed. Indices start with 1, so I'll modify your request in that respect.
p = [1:10,50:70,90:100]; A(p,:) = A(p,:) + s*sqrt(2*log(rand(length(p),size(A,2))));
where s is the sigma parameter. The mean value of the addition would be
sqrt(pi/2)*s and the variance (4pi)/2*s^2.
Or you can use the statistical toolbox function, 'raylrnd'.
Roger Stafford



