Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

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

  • To: mathgroup at
  • Subject: [mg75267] Re: how to make myVec[v,3] to return {v_1, v_2, v_3} ?
  • From: Bill Rowe <readnewsciv at>
  • Date: Mon, 23 Apr 2007 05:36:58 -0400 (EDT)

On 4/21/07 at 11:12 PM, tsariysk at (T.Sariyski) wrote:

>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}

Use proper Mathematica syntax, i.e.,

Table[Subscript[v,i], {i,3}]

alternatively, there is

To reply via email subtract one hundred and four

  • Prev by Date: Re: question
  • Next by Date: Re: equation solving in a markov model
  • Previous by thread: Integration Question
  • Next by thread: Re: question (2nd)