MathGroup Archive 2011

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

Search the Archive

Re: Sorting a list of symbols

  • To: mathgroup at smc.vnet.net
  • Subject: [mg116840] Re: Sorting a list of symbols
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Wed, 2 Mar 2011 04:33:35 -0500 (EST)

I'd use v[1], v[2], v[3], et cetera.

indices = {1, 2, 3, 4, 10};
Table[v@i, {i, indices}]

{v[1], v[2], v[3], v[4], v[10]}

Bobby

On Tue, 01 Mar 2011 04:22:25 -0600, Robert Wright  
<mathematicauser1 at yahoo.com> wrote:

> Is there a way of sorting a list of symbols like {v1, v2, v3, v10, v4}  
> such that
> it gives {v1, v2, v3, v4, v10} and not the Mathematica default of  
> {v1,v10, v2,v3, v4}? I
> am trying to avoid using the obvious solution of {v01, v02, v03, v04,  
> v10}!


-- 
DrMajorBob at yahoo.com


  • Prev by Date: Re: Sorting a list of symbols
  • Next by Date: Re: NIntegrate and speed
  • Previous by thread: Re: Sorting a list of symbols
  • Next by thread: Re: Sorting a list of symbols