Re: Matrix Problem
- To: mathgroup at smc.vnet.net
- Subject: [mg15253] Re: [mg15247] Matrix Problem
- From: "Jorge Zickermann" <jzickermann at mail.EUnet.pt>
- Date: Mon, 28 Dec 1998 02:37:50 -0500
- Sender: owner-wri-mathgroup at wolfram.com
Peter, If you have an output such as defined by the following t, you can place it in the form you want by Flattening and then Partitioning the list into lists with the number of elements you want. Maybe its not the most elegant but it works. Jorge As an example; In[55]:= t = {{{1.1547},{0},{0},{0}},{{0},{0.755929},{0},{0}}, {{-0.258199},{0},{0.774597},{0}},{{0.},{-0.169031},{0.},{1.18322}}} Out[55]= {{{1.1547},{0},{0},{0}},{{0},{0.755929},{0},{0}},{{-0.258199},{0},{0.774597} ,{ 0}},{{0.},{-0.169031},{0.},{1.18322}}} In[56]:= t=Partition[Flatten[t],4] Out[56]= {{1.1547,0,0,0},{0,0.755929,0,0},{-0.258199,0,0.774597,0},{0.,-0.169031,0., 1.18322}} ---------- >From: Peter <phuesser at bluewin.ch> To: mathgroup at smc.vnet.net >To: mathgroup at smc.vnet.net >Subject: [mg15253] [mg15247] Matrix Problem >Date: Sun, Dec 27, 1998, 8:58 am > >output: > >t= > N[GramSchmidt[{ve[1],ve[2],ve[3],ve[4]}, > InnerProduct -> > (skproduct[#1, #2]&)]] > >{{{1.1547},{0},{0},{0}},{{0},{0.755929},{0},{0}}, > {{-0.258199},{0},{0.774597},{0}},{{0.},{-0.169031},{0.},{1.18322}}} > >But I would like to have t in the following form: > >{{1.1547,0,0,0},{0,0.755929,0,0}, > {-0.258199,0,0.774597,0},{0.,-0.169031,0.,1.18322}} > >so t should be a real matrix. How can I make the innerst brackets >disapear ? > >Thank's for any help > > pedro >