Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: define a function with variable coefficients

0 views
Skip to first unread message

Andong He

unread,
Dec 30, 2009, 4:14:58 AM12/30/09
to
Thank you Daniel, your response is helpful.
But what I want is Power[z,j] instead of Superscript[z,j], because I wanna 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?

Norbert P.

unread,
Dec 31, 2009, 3:14:34 AM12/31/09
to
On Dec 30, 1:14 am, Andong He <azh...@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


0 new messages