登录论坛

查看完整版本 : [MATLAB混合编程] 求助分析 p(I,J)=(sqrt(x(I)^2+y(J)^2) <= a)


sweet_catt
2009-04-19, 16:51
Imax=length(x)%Imax=101
Jmax=length(y)%Jmax=101

a=d/2;

for I=1:Imax %initialize circular pupil
for J=1:Jmax
p(I,J)=(sqrt(x(I)^2+y(J)^2) <= a) ;
end
end