Re: define a function with variable coefficients
- To: mathgroup at smc.vnet.net
- Subject: [mg106041] Re: define a function with variable coefficients
- From: "Norbert P." <bertapozar at gmail.com>
- Date: Thu, 31 Dec 2009 03:14:47 -0500 (EST)
- References: <hhf5mi$gqi$1@smc.vnet.net>
On Dec 30, 1:14 am, Andong He <azh... at psu.edu> wrote: > Thank you Daniel, your response is helpful. > But what I want is Power[z,j] instead of Superscript[z,j], because I wann= a raise z to power 1,2,..., n, and it doesn't work! > Again I get terms like a_(1+n)[t] and a_(2+n)[t]. So confusing! > > Where did I make a mistake? As Daniel said, a_j[t] is interpreted as Pattern[a, Blank[j]][t] because _ (underscore) has a build-in meaning in Mathematica (look up Blank). It can't be a part of a symbol name as in other programming languages. That's probably what's causing your problems. Use Subscript [a,j][t] instead. As for the power, ^ will work just fine, but you said you wanted a superscript ;) Norbert