MathGroup Archive 2002

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

Search the Archive

RE: Appending to a matrix?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg38544] RE: [mg38543] Appending to a matrix?
  • From: "SEPULVEDA,ARIEL (HP-PuertoRico,ex1)" <ariel.sepulveda at hp.com>
  • Date: Wed, 25 Dec 2002 03:12:44 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

In the package LinearAlgebra`MatrixManipulation` you will find the answer to
your first question and insights into the other.

-----Original Message-----
From: Jeremy [mailto:cfgauss at pants.attbi.com]
To: mathgroup at smc.vnet.net
Subject: [mg38544] [mg38543] Appending to a matrix?


How do I append a column vector to the end of a matrix in mathematica?

For example, I want to turn:
[1 2 3]     [1]
[4 5 6] and [1]
[7 8 9]     [1]

into

[1 2 3 1]
[4 5 6 1]
[7 8 9 1]

Or, actually,

[1 2 3 | 1]
[4 5 6 | 1]
[7 8 9 | 1]

Not that it really matters.

Also, is there a way that I can stick the entries of a row reduced matrix
onto powers of x's?  Like

[1 0 0 | 1]
[0 1 0 | 2]
[0 0 1 | 3]

to

1 + 2x + 3x^2
?

Many thanks,
Jeremy

--


  • Prev by Date: Re: Appending to a matrix?
  • Next by Date: Help with pasting with Basic Input Palette
  • Previous by thread: Re: Appending to a matrix?
  • Next by thread: Re: Appending to a matrix?