Hello, here is a part of my code where I am trying to add adjacent rows, i.e a(R1)+a(R2) =b(R2), a(R2)+a(R3) = b(R3) and so on. Could anyone please help me solve the issue of exceeding array bounds in position 1.
i = 2:500;
j = 2:500;
if ( i == j)
b(j,1) = a(i,1) + a(i-1,1)+ b(j-1,1);
Thanks in advance!