MathGroup Archive 2009

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

Search the Archive

Re: Generating a list numnber in string format

  • To: mathgroup at smc.vnet.net
  • Subject: [mg102614] Re: [mg102598] Generating a list numnber in string format
  • From: Tomas Garza <tgarza10 at msn.com>
  • Date: Mon, 17 Aug 2009 04:01:44 -0400 (EDT)
  • References: <200908161040.GAA01235@smc.vnet.net>

Use ToString:

In[1]:= nums=Range[5]
Out[1]= {1,2,3,4,5}

In[2]:= binlist=ToString/@nums
Out[2]= {1,2,3,4,5}

In[3]:= binnames=Map["bin"<>#&,binlist]
Out[3]= {bin1,bin2,bin3,bin4,bin5}

Tomas

> Date: Sun, 16 Aug 2009 06:40:58 -0400
> From: rich.bis at wanadoo.fr
> Subject: [mg102598] Generating a list numnber in string format
> To: mathgroup at smc.vnet.net
>
> Hello,
>
> I would like to be able generate a list of numbers from 1 to n string
> format.
>
> binlist={"1","2","3","4",..."n"}
>
> I need to use them in this format to map into a list of variable names
>
> binnames = Map["bin" <> # &, binlist]
>
>
>


  • Prev by Date: Re: Generating a list numnber in string format
  • Next by Date: printing issue with a simple graphic
  • Previous by thread: Re: Generating a list numnber in string format
  • Next by thread: Re: Generating a list numnber in string format