MathGroup Archive 2009

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

Search the Archive

Re: Chain Matrix

  • To: mathgroup at smc.vnet.net
  • Subject: [mg96488] Re: Chain Matrix
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Sat, 14 Feb 2009 03:13:07 -0500 (EST)
  • References: <gn3bvk$q50$1@smc.vnet.net>

Hi,

q[h_] := {{q1, q2}, {q3, q4}};

qList = Table[q[h], {4}];

and

Fold[Dot[#1, #2] &, IdentityMatrix[2], qList]

does the job.

Regards
   Jens

Antonio Carlos Siqueira wrote:
> Hi everyone!
> I have a matrix in which all the elements are function of a scalar h,
> Say q[h]={{q1,q2},{q3,q4}} and what I need is to create a chain matrix
> so I can obtain the dot product of several q[h]. For instance, if  h=
> {h1,h2,h3}
> I can create a large matrix with
> m=Map[q,h]
> Then I do
> Dot[m[[1]],m[[2],m[[3] ]
> 
> The problem is that there are cases where the Length[h] may reach a
> few hundreds and I do not want to write Dot[m[[1]], ..., m[[200]] ]
> So  I have a somewhat trivial question:
>  Is there any way I can do this automatically? I mean how can I create
> a function to create an equivalent matrix from a chain of matrices?
> I tried some solutions with thread and fold, but I did not get
> anywhere, any thoughts are appreciated.
> 
> Thanks
> 
> Antonio
> 


  • Prev by Date: Re: Re: Scalar plot in 3D
  • Next by Date: Re: Problem with DSolve
  • Previous by thread: Chain Matrix
  • Next by thread: Re: Chain Matrix