RE: arranging a list
- To: mathgroup at smc.vnet.net
- Subject: [mg32218] RE: [mg32211] arranging a list
- From: "David Park" <djmp at earthlink.net>
- Date: Mon, 7 Jan 2002 03:16:45 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Doron,
Just use Flatten.
Even simpler, you could have entered and used F as a simple list, instead of
as a one column matrix. Mathematica knows how to multiply a matrix times a
vector (represented as a simple list) and does it the right way.
F={0,13.75,11.75,9.75,3.875}
Inverse[k].F produces what you want.
Also
LinearSolve[k, F]
David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/
> From: Doron [mailto:klepachd at yahoo.com]
To: mathgroup 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`}
>