How to define a list of functions/variables
- To: mathgroup at smc.vnet.net
- Subject: [mg102174] How to define a list of functions/variables
- From: Haibo Min <haibo.min at gmail.com>
- Date: Fri, 31 Jul 2009 05:57:11 -0400 (EDT)
Hello, everyone. I want to define a list of variables "qi" and "Omegai", where q and Omega are both vectors and "i" denotes the ith vector, i.e., qi[t]={qi1[t],qi2[t],qi3[t]}, Omegai[t]={Omegai1[t],Omega2[t],Omegai3[t]}. then I use the following code. eqns[n_Integer] /; Positive[n] := Table[{Subscript[q, i][t_] := {Subscript[q, i1][t], Subscript[q, i2][t], Subscript[q, i3][t]}, Subscript[\[Omega], i][t_] := {Subscript[\[Omega], i1][t], Subscript[\[Omega], i2][t], Subscript[\[Omega], i3][t]}}, {i, n}] but it shows that: eqns[2]={{Null, Null}, {Null, Null}} why? Thanks! Regards, Haibo