How can I simplify this code. I.e remove the loops and replace them with matrix math.
for i=1:3 for j = i:num_pts - i diag(i,j) = testm1(j,2) * testm2(j+i,2); endend
loops
for i=1:3 for j = i:num_pts - i diag(i,j) = testm1(j,2) * testm2(j+i,2); endend
Best Answer