1
$\begingroup$

I am trying to figure out how to implement progress indicator in RecurrenceTable. I have a complicated code within the With function that contains recurrence table. A simple code will suffice say,

ans = RecurrenceTable[{a[n+1] == 3a[n], a[1] == 7, a, {n, 1, 10}]

I tried the following,

ans=RecurrenceTable[{a[n+1]==3a[n], a[1]==7, a, {Dynamic[n],1,10}]
ans=RecurrenceTable[{a[n+1]==3a[n], a[1]==7, a, {ProgressIndicator[n],1,10}]
ans=RecurrenceTable[{a[n+1]==3a[n], a[1]==7, a, PrintTemporary[n],{n,1,10}]
Monitor[RecurrenceTable[{a[n+1]==3a[n], a[1]==7,a,{n,1,10}],ProgressIndicator[n]]

and all of them failed.

Any suggestions?

$\endgroup$
1
  • $\begingroup$ I don't think that RecurrenceTable exposes the value of the iterator n it is working on the way that Table does, so I am not sure that this is possible. $\endgroup$
    – MarcoB
    Jul 21, 2022 at 14:50

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.