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

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

Search the Archive

Re: Could this be improved?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg21784] Re: Could this be improved?
  • From: "DIAMOND Mark" <noname at noname.com>
  • Date: Thu, 27 Jan 2000 22:57:07 -0500 (EST)
  • Organization: The University of Western Australia
  • References: <86mdpv$2f3@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

How about

a={1,2,3,4,5};

Transpose[Table[RotateRight[PadRight[a, 2*Length[a] - 1], i], {i, 0,
Length[a] - 1}]]


I am not sure how others would rate this solution. I came to it somewhat by
chance, first printing out your result in MatrixForm
and then observing that the columns were more simply described than the
rows, even though the rows are what
you are most interested in. Constructing the columns was then fairly easy
and Transpose gives you back what you want.

--
Mark R Diamond
Vision Research Laboratory
The University of Western Australia
no spam email: markd at psy dot uwa dot edu dot au





  • Prev by Date: CORRUPTED NOTEBOOKS
  • Next by Date: Re: Bessel J0 zeros
  • Previous by thread: Re: Could this be improved?
  • Next by thread: Re: Could this be improved?