2D normal distribution with variable array

1 Ansicht (letzte 30 Tage)
richard
richard am 7 Okt. 2013
I am trying to make a 2D vaiable array in 'r' so that I can generate a 2D normal distribution.
I have the code for the 'r' array but I am having difficulty implementing it into the 2D normal distribution function.
Here is what my code looks like for the 'r' array (222 x 222):
N=222
for j=1:N
for i=1:N
r(i,j)=sqrt((i-N/2)^2 + (j-N/2)^2)
end
end
Again I'm not sure how to put this 'r' array into a 2D normal distribution function.
Any help would be appreciated

Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by