loop with {!i-1}
Posted: Tue Mar 23, 2010 12:45 pm
Hello,
¿How do you type A(t-1) in a loop of equations?
I want to calculate these equations:
A_2009=c(1)+c(2)*B_2008
....
A_1988=c(1)+c(2)*B_1987
With this loop:
For !i=1988 to 2009
equation eq{!i}.ls A_{!i} c B_{!i-1}
next
¿how can you type B_i-1 in each equation?
Neither B_{!i-1} nor B_{!i}-1 works.
Thanks a lot.
¿How do you type A(t-1) in a loop of equations?
I want to calculate these equations:
A_2009=c(1)+c(2)*B_2008
....
A_1988=c(1)+c(2)*B_1987
With this loop:
For !i=1988 to 2009
equation eq{!i}.ls A_{!i} c B_{!i-1}
next
¿how can you type B_i-1 in each equation?
Neither B_{!i-1} nor B_{!i}-1 works.
Thanks a lot.