2D normal distribution with variable array
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!