Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Recursion with foxpro
Message
From
15/01/2006 18:10:33
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01086981
Message ID:
01086984
Views:
40
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform