Corrected matlab conversion: A(N) -> A(n+1)