How to write code for moments i.e 0th order(M00),1st order (M10,M01), i wrote it by using for loop
for i=0:1:1 for j=0:1:1 for k=1:1:row for l=1:1:col M(i,j)=M(i,j)+(k^i*l^j*I2(k,l)); end end endend
but it gives error ??? Attempted to access M(0,0); index must be a positive integer or logical. is there any other way of writing code for Moments???
Best Answer