The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: VectorToMatrix
Replies: 6   Last Post: Jul 8, 1996 2:19 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Robert Pratt

Posts: 56
Registered: 12/7/04
Posted: Jun 26, 1996 2:59 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I want to define a function VectorToMatrix[list_, n_] that behaves as

VectorToMatrix[{a,b,c,d,e,f,g,h,i,j}, 4]//MatrixForm

0 a b c d
0 0 e f g
0 0 0 h i
0 0 0 0 j

Now n can be determined from Length[list], which will always be equal to
n choose 2 for some n. But I would rather input n to save that
computation. (I will be doing this for a lot of vectors.)

Any ideas?

Rob Pratt
Department of Mathematics
The University of North Carolina at Chapel Hill
CB# 3250, 331 Phillips Hall
Chapel Hill, NC 27599-3250

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.