Re: Matrix Problem
- To: mathgroup at smc.vnet.net
- Subject: [mg53580] Re: Matrix Problem
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Wed, 19 Jan 2005 01:59:29 -0500 (EST)
- Reply-to: hanlonr at cox.net
- Sender: owner-wri-mathgroup at wolfram.com
(data=Flatten[Table[ {Sin[x],Cos[y],Sin[x] Cos[y]}, {y,0,2,1},{x,0,3,1}],1])//MatrixForm Bob Hanlon > > From: nilaakash at gmail.com (nilaakash) To: mathgroup at smc.vnet.net > Date: 2005/01/18 Tue AM 05:07:53 EST > To: mathgroup at smc.vnet.net > Subject: [mg53580] Matrix Problem > > Hi, > I face a problem to get (3xn) matrix data. Here I am giving a > simple example. > > data = Table[{Sin[x], Cos[y], Sin[x] Cos[y]}, {x, 0, 3, 1}, > {y, 0, 2, 1}]; > MatrixForm[data] > > It prints a (4x3) block matrix. > > Could anybody tell me how shall I get only 3 column matrix like > following matrix ? > > Sin[0] Cos[0] Sin[0] Cos[0] > Sin[1] Cos[0] Sin[1] Cos[0] > Sin[2] Cos[0] Sin[2] Cos[0] > Sin[3] Cos[0] Sin[3] Cos[0] > Sin[0] Cos[1] Sin[0] Cos[1] > Sin[1] Cos[1] Sin[1] Cos[1] > Sin[2] Cos[1] Sin[2] Cos[1] > Sin[3] Cos[1] Sin[3] Cos[1] > Sin[0] Cos[2] Sin[0] Cos[2] > Sin[1] Cos[2] Sin[1] Cos[2] > Sin[2] Cos[2] Sin[2] Cos[2] > Sin[3] Cos[2] Sin[3] Cos[2] > > Thanks. > > Nilaakash > >