MathGroup Archive 2014

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

Search the Archive

Re: Building a matrix

  • To: mathgroup at smc.vnet.net
  • Subject: [mg132739] Re: Building a matrix
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Mon, 19 May 2014 20:15:05 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net

On 5/19/14 at 2:03 AM, brunocam at libero.it (Bruno Campanini) wrote:

>Given:

>m = [0,0,0} n = {1,2,3}

>how can I get a function to give:

>{{1,2,3,0,0,0,0,0,0}, {0,0,0,1,2,3,0,0,0}, {0,0,0,0,0,0,1,2,3}}

In[1]:= NestList[RotateRight[#, 3] &, PadRight[{1, 2, 3}, 9], 2]
Out[1]= {{1, 2, 3, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 1, 2, 3, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 1, 2, 3}}




  • Prev by Date: Re: Mathematica inside Excel VBA Macro
  • Next by Date: Re: Building a matrix
  • Previous by thread: Re: Building a matrix
  • Next by thread: Re: Building a matrix