MathGroup Archive 2010

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

Search the Archive

Re: Table of tables

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113284] Re: Table of tables
  • From: Ray Koopman <koopman at sfu.ca>
  • Date: Fri, 22 Oct 2010 01:34:53 -0400 (EDT)
  • References: <i9p6ig$og3$1@smc.vnet.net>

On Oct 21, 4:01 am, Luiz Melo <luiz.m... at polymtl.ca> wrote:
> Thanks Sebastian and Valeri for the help.
>
> I'm actually looking for a function that operates only on the third
> row of each column-matrix terms(which happen to be complex in the
> example I gave), but leaves the other terms intact. Consider a
> different example:
>
> Let
> t = {{{-1, -1, -2}, {-1, -1, -3}}, {{-1, -1, -4}, {-1, -1, -5}}};
>
> how can I get
>
> {{{-1, -1, 2}, {-1, -1, 3}}, {{-1, -1, 4}, {-1, -1, 5}}};
>
> that is, in this case, I need a function that takes the Abs[] of
> the 3rd row of each sub-matrix and leaves the other terms intact.
>
> Regards,
> Luiz

t /. {a_,b_,c_} -> {a,b,Abs[c]}


  • Prev by Date: FunctionQ?
  • Next by Date: Two questions related to Arrays
  • Previous by thread: Re: Table of tables
  • Next by thread: Re: Table of tables