MathGroup Archive 2002

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

Search the Archive

Re: arranging a list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg32225] Re: arranging a list
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Mon, 7 Jan 2002 03:16:57 -0500 (EST)
  • References: <a192kf$7q3$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Doron,

One way to track the solution down is to look up in the Help Browser

    Built-in Functions > Lists and Matrices > Structure Manipulation > ...

You will find that
    Flatten[u]

does what you want.

Incidentally, it's a good idea to limit queries to the essentials - they are
then more likely to be answered.
Here the problem is nothing to do with how  u  was constructed; so the
following could have been used

"How do I remove the inner parentheses from

 \!\({{1.3010426069826053`*^-14}, {5.21666666666668`},
{8.201960784313735`}, \
{9.636171310629523`}, {10.005218929677142`}}\)

to get

{1.3010426069826053`*^-14, 5.21666666666668`, 8.201960784313735`, \
9.636171310629523`, 10.005218929677142`}

?"

( Even clearer would be "How do I remove the inner parentheses from  {{a},
{b}, {c} } to get {a,b,c} ")


Allan

---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565


"Doron" <klepachd at yahoo.com> wrote in message
news:a192kf$7q3$1 at smc.vnet.net...
> hello, i am interested in arranging a list :
> for example ->
> \!\(\*
>   RowBox[{
>     RowBox[{"k", "=",
>       RowBox[{"(", GridBox[{
>             {"1", "0", "0", "0", "0"},
>             {\(-7.5\), "16", \(-8.5\), "0", "0"},
>             {"0", \(-8.5\), "18", \(-9.5\), "0"},
>             {"0", "0", \(-9.5\), "20", \(-10.5\)},
>             {"0", "0", "0", \(-10.5\), "10.5"}
>             }], ")"}]}], ";",
>     RowBox[{"F", "=",
>       RowBox[{"(", GridBox[{
>             {"0"},
>             {"13.75"},
>             {"11.75"},
>             {"9.75"},
>             {"3.875"}
>             }], ")"}]}], ";"}]\)
>
> In[43]:=
> u=Inverse[k].F
>
> Out[43]=
> \!\({{1.3010426069826053`*^-14}, {5.21666666666668`},
> {8.201960784313735`}, \
> {9.636171310629523`}, {10.005218929677142`}}\)
>
> How can I arrange this list to be of ordinary numbers{without the
> inner parentheses :
> {1.3010426069826053`*^-14, 5.21666666666668`, 8.201960784313735`, \
> 9.636171310629523`, 10.005218929677142`}
>




  • Prev by Date: Re: Testing that the elements are a list are exponential
  • Next by Date: RE: Wrestling with Mathematica on Trig Simplification
  • Previous by thread: RE: arranging a list
  • Next by thread: Synergetics Coordinates NoteBooks