Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*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 2004

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

Search the Archive

Re: [Outer [Times, , ] ] Question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg45855] Re: [Outer [Times, , ] ] Question
  • From: Mariusz Jankowski<mjankowski at usm.maine.edu>
  • Date: Tue, 27 Jan 2004 04:51:01 -0500 (EST)
  • Organization: University of Southern Maine
  • References: <bv00aa$jda$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Remove MatrixForm from your lines m1 = ..., m2 = ... etc

Mariusz




>>> <MichaelSMcCain at cs.com> 1/25/2004 3:55:38 AM >>>
Hi:

I want to take a Column Vector and multiply it by a Row Vector to create an

"Outer" Matrix. 

In other words, I want to take a 5x1 Column Vector and multiply it by a 1x4

Row Vector and output a 5x4 Matrix.

I then want to add several of these Matrices together and obtain a "final" 
Matrix.

I tried the following:

x1 = {1, -1, -1, 1, 1};
y1 = {1, 1, -1, -1};

x2 = {-1, 1, -1, 1, -1};
y2 = {1, -1, 1, -1};

x3 = {1, 1, -1, -1, 1};
y3 = {-1, -1, 1, 1};

m1 = MatrixForm[Outer [Times, x1, y1] ]
m2 = MatrixForm[Outer [Times, x2, y2] ]
m3 = MatrixForm[Outer [Times, x3, y3] ]

mm = m1 + m2 + m3

MatrixForm[mm]

The output that I get is incorrect and does not combine into a single
Matrix.


What am I doing wrong?

Thanks,


Mike McCain
MichaelSMcCain at cs.com 




  • Prev by Date: Re: Problems with Plot in Mathematica 4.0
  • Next by Date: Re: GridPlot
  • Previous by thread: Re: Noisy data and ListConvolve
  • Next by thread: Re: GridPlot