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