Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Matrix Problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg53589] Re: Matrix Problem
  • From: Bill Rowe <readnewsciv at earthlink.net>
  • Date: Wed, 19 Jan 2005 01:59:50 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

On 1/18/05 at 5:07 AM, nilaakash at gmail.com (nilaakash) wrote:


>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.

It should be a 4x3x3 matrix. So I assume you mis-typed here

>Could anybody tell me how shall I get only 3 column matrix like
>following matrix ?

Flatten[data,1] will create what you want. But note Sin[0] gets evaluated to 0 and Cos[0] gets evaluated to 1. So rather than having the first row as you indicated in your post it will be {0,1,0}.

If you really want to have the output be Sin[0] rather than 0, there is probably a way to do this using Hold.
--
To reply via email subtract one hundred and four


  • Prev by Date: does a matrix equivalent of the Arg function exist?
  • Next by Date: Re: Calling windows programs
  • Previous by thread: Matrix Problem
  • Next by thread: Re: Matrix Problem