tygt12 发表于 2011-11-26 20:13

看了半天求助啊Attempted to access A(1,0); index must be a positive integer or l

for N=1:1:8
    A(N,0)=1;
end
??? Attempted to access A(1,0); index must be a positive integer or logical.
看了半天好像没问题吧,为什么说索引不对呢?

madio 发表于 2011-11-26 20:57

你大概之前一直在使用C语言,C的数组是从0开始的,Matlab的矩阵怎么会有第0列呢?你把A(N,0)改成A(N,1)
页: [1]
查看完整版本: 看了半天求助啊Attempted to access A(1,0); index must be a positive integer or l