2D normal distribution with variable array

조회 수: 1 (최근 30일)
richard
richard 2013년 10월 7일
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

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by