MathGroup Archive 2007

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

Search the Archive

Re: Scalars Instead of Lists with One Element

  • To: mathgroup at smc.vnet.net
  • Subject: [mg83485] Re: Scalars Instead of Lists with One Element
  • From: Bill Rowe <readnewsciv at sbcglobal.net>
  • Date: Wed, 21 Nov 2007 02:59:19 -0500 (EST)

On 11/20/07 at 3:46 AM, gregory.lypny at videotron.ca (Gregory Lypny)
wrote:

>Say I have the list x={2, 7}.  Is there a command I can use to get 2
>rather than {2} when I ask for x[[1]], and 7 rather than {7} when I
>ask for x[[2]]?  Doing so would solve my problem with my tables
>being too deep to be able to cut and paste directly into the table
>objects of other applications like word processors and spread sheets.

Your wording is very confusing or perhaps you haven't stated
your problem quite right. When you say you "ask for x[[1]]" what
does that mean if not entering x[[1]] somewhere? And if that is
what you mean, then since

In[14]:= x = {2, 7};

In[15]:= x[[1]]

Out[15]= 2

then there is something wrong with what you wrote above.

Generally, it is better to post some code to eliminate this kind
of confusion.
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: MapThread over ragged arrays
  • Next by Date: Re: Variable-length list?
  • Previous by thread: Re: Scalars Instead of Lists with One Element
  • Next by thread: Re: Scalars Instead of Lists with One Element