I'm doing some practice problems for experience and can't get past an error with my counter with this function. What am I missing here?
Thanks in advance
function x = triangle(n)i = 1;for i:n-1 x(i) = i+x(i+1); i = i+1endend
counterfor loops
function x = triangle(n)i = 1;for i:n-1 x(i) = i+x(i+1); i = i+1endend
Best Answer