求助:用for赋值矩阵时出现的问题
for I=0:0.01:2,for J=0:pi/100:2*pi,
result=dblquad(inline('x.*exp(i*(x.^3.*cos(y)-I.*x.*cos(y-J)-x.^2))'),0,1,0,2*pi,[],[],I,J);%求二重积分
a=I./0.01+1;b=J/(pi/100)+1;
A(a,b)=((abs(result)).^2)/(pi.^2);
end
end
A
运行时出现以下的代码:
??? Attempted to access A(15,1); index must be a positive integer or logical.
Error in ==> Untitled1 at 5
A(a,b)=((abs(result)).^2)/(pi.^2);
请问那位大侠知道哪里出问题了?请赐教。不胜感激!