zdravím kolegové, mam problém s jedním řádkem v mathematice:
RecurrenceTable[{x[n] == x[n - 1] + r*x[n - 1]*d + a*x[n - 1]*w[[n]],
x[0] == x0, t[n] == t[n - 1] + d, t[0] == 0}, {t, x}, {n, 1, 200}]vypisuje mi hlášení:
Part::pspec: Part specification n is neither an integer nor a list of integers.
Part::pspec: Part specification n is neither an integer nor a list of integers.
Part::pspec: Part specification 1+n is neither an integer nor a list of integers.
General::stop: Further output of Part::pspec will be suppressed during this calculation.
přesto vrátí tabulku hodnot, která vypadá v pořádku. hlášení způsobuje člen w[[n]], ale vůbec netušim proč. nějaké nápady?
Offline

Stejnou chybu dává Mathematica i na jednodušším příkladu
w[[n]] /. {n -> 2}takže to bude tím, že tam chce mít Mathematica číslo přímo. Nevyznám se v tom ale tolik, abych dokázal říct víc.
Offline