Message Boards Message Boards

0
|
6405 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

RecurrenceTable strange error

Posted 10 years ago

Hi,

I'm trying to solve the system $$ \begin{align*} &V(m)=\alpha + \beta V(m+1)+\beta \sum_{f=1}^4 Z(m+1,f)\ &U(f)=\gamma +\beta U(f+1)+\beta \sum_{m=1}^4 Z(m,f+1)\ &Z(m,f)=\zeta + \beta (Z(m+1,f+1)+U(f+1)+V(m+1))\ &V(4)=U(4)=Z(4,f)=Z(m,4)=0. \end{align*} $$

Using recurrence table, my code is

T = 4;
\[Beta] = .95;
\[Alpha] = .3;
\[Gamma] = .2;
\[Zeta] = \[Alpha] + \[Gamma] + .3
RecurrenceTable[{
V[m]==\[Alpha]+\[Beta] V[m+1]+\[Beta] Sum[Z[m+1,f],{f,1,4}],
U[f]==\[Gamma]+\[Beta] U[f+1]+\[Beta] Sum[Z[m,f+1],{m,1,4}],
Z[m,f]==\[Zeta]+\[Beta] Z[m+1,f+1]+\[Beta] U[f+1]+\[Beta] V[m+1],
V[T]==0,U[T]==0,Z[4,1]==Z[4,2]==Z[4,3]==Z[4,4]==Z[3,4]==Z[2,4]==Z[1,4]==0},
{V,U,Z},{m,1,T-1},{f,1,T-1}]

However, I get a strange-looking error: RecurrenceTable::dvlen: -- Message text not found -- (V[m]) (2) >>

What throws me off is the "Message text not found". Does anyone notice what's wrong with my code? I'm using Mathematica 10.1 on a Mac.

POSTED BY: Miguel Olivo-V

At least one can modify a working example

In[16]:= RecurrenceTable[{a[n + 1] == 3 a[n], a[1] == 7}, a, {n, 1, 10}]
Out[16]= {7, 21, 63, 189, 567, 1701, 5103, 15309, 45927, 137781}

into a wrong example

In[17]:= RecurrenceTable[{a[n + 1] == 3 a[n, m], a[1] == 7}, a, {n, 1,  10}]
During evaluation of In[17]:= RecurrenceTable::dvlen: -- Message text not found -- (a[n,m]) (1) >>
Out[17]= RecurrenceTable[{a[1 + n] == 3 a[n, m], a[1] == 7}, a, {n, 1, 10}]

to enforce the message. Reasoning by analogy some appearance of V[m] in the original expression is considered harmful. But there is only one appearance of V[m] ...

POSTED BY: Udo Krause
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract