Re: Chain Matrix
- To: mathgroup at smc.vnet.net
- Subject: [mg96456] Re: Chain Matrix
- From: dh <dh at metrohm.com>
- Date: Sat, 14 Feb 2009 03:07:16 -0500 (EST)
- References: <gn3bvk$q50$1@smc.vnet.net>
Hi Antonio,
if I understand correctly, you have a list of matrices of which you wnat
the Dot product. "Apply" is mader for you!. E.g.:
lom = {m1, m2, m3};
Dot@@lom
gives what you want, Daniel
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
>