MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

how to make myVec[v,3] to return {v_1, v_2, v_3} ?


Hi,

I want to define a function that takes a symbol and integer and 
generates a vector e.g. myVec[v,3] returns  {v_1, v_2, v_3}? I tried

Table[v_Subscript_i, {i, 1, 3}]

but it returns {v_i, v_i, v_i}

Thanks,
Ted


In[1406]:=
Table[v\[UnderBracket]Subscript\[UnderBracket]i, {i, 1, 3}]



  • Prev by Date: Re: neat way to program minimum of sum
  • Next by Date: sorry for the previous massage
  • Previous by thread: Publicon
  • Next by thread: Re: how to make myVec[v,3] to return {v_1, v_2, v_3} ?