>Hi all,
>
>Is it possible to do recursion in foxpro? If so how would I set the following
>equations with recursion functions:
>
>aa(x,n) = 0.5 + 1/1.03*Px[state,state]*aa(x+1,n-1)
>+ 1/1.03*Px[state,state]*ia(x+1,n-1,1)
>
>ia(x,n,inv) = 0.5 + 1/1.03*Px[state,state]*aa(x+1,n-1)
>+ 1/1.03*Px[state,state]*ia(x+1,n-1,inv+1)
>
>where aa(x,0) = 0 and ia(x,0,inv) = 0 and ia(x,n,inv) = 0 for inv > 6 and Px is a given matrix.
Sure, you can call a function from within that function. How that must be done with the above equation is your endeavour. :)
Groet,
Peter de Valença
Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.