"maryam" wrote in message <firstname.lastname@example.org>... > I want add a clutter model with rayleigh distribution by random command to a 100-by-40 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 (4-pi)/2*s^2.
Or you can use the statistical toolbox function, 'raylrnd'.