Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1996
*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 1996

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

Search the Archive

VectorToMatrix

  • To: mathgroup at smc.vnet.net
  • Subject: [mg4283] VectorToMatrix
  • From: Robert Pratt <rpratt at math.unc.edu>
  • Date: Sat, 29 Jun 1996 03:54:08 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

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

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

rpratt at math.unc.edu



  • Prev by Date: Color printers for Mathematica
  • Next by Date: sound display
  • Previous by thread: Color printers for Mathematica
  • Next by thread: sound display