MathGroup Archive 1999

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

Search the Archive

Re: Multiply a constant to a matrix column

  • To: mathgroup at smc.vnet.net
  • Subject: [mg16316] Re: Multiply a constant to a matrix column
  • From: "Martin Rommel" <rommel at semitest.com>
  • Date: Sun, 7 Mar 1999 01:05:42 -0500
  • Organization: UltraNet Communications , an RCN Company http://www.ultranet.com/
  • References: <7bo0gg$dop@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

This works (multiplying the second column by x), but there are many more and
probably more elegant solutions:

    lst={{a,b,c},{d,e,f},{g,h,i}};

    lst=Thread[Thread[lst]{1,x,1}];

    lst//TableForm

Martin

P.S. Thread in this case works the same as Transpose, only faster.




Hyo ahn wrote in message <7bo0gg$dop at smc.vnet.net>...
>I would like to multiply a constant number to a certain column of an
existing
>matrix in Mathematica and I am having a hard time.





  • Prev by Date: Re: Vector Field
  • Next by Date: Re: Evaluating UnitStep inside another function
  • Previous by thread: Re: Multiply a constant to a matrix column
  • Next by thread: Re: Multiply a constant to a matrix column