Handling several variables at once during matrix multiplications

• To: mathgroup at smc.vnet.net
• Subject: [mg30913] Handling several variables at once during matrix multiplications
• From: Yasvir Tesiram <y.tesiram at pgrad.unimelb.edu.au>
• Date: Mon, 24 Sep 2001 01:49:17 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```Dear Group,
Could someone point me in the right direction of a matrix multiplied by
a vector, where the matrix elements change with each increment of data
and the final vector becomes the initial vector.

I have 2x2 matrix,

mat = {{fxx,fxy},{fyx,fyy}};

where the elements of the matrix are defined as,

fxx[rfMax_, bwdth_, Tp_, t_, np_, s_] :=
Sin[\[Beta]]^2*Cos[\[Theta][rfMax, bwdth, Tp, t, np, s]] +
Cos[\[Beta]]^2*(Cos[\[Alpha][rfMax, bwdth, Tp, t, np, s]]^2 +
Sin[\[Alpha][rfMax, bwdth, Tp, t, np, s]]^2*
Cos[\[Theta][rfMax, bwdth, Tp, t, np, s]]);
fxy[rfMax_, bwdth_, Tp_, t_, np_,
s_] := -Sin[\[Alpha][rfMax, bwdth, Tp, t, np, s]]*
Sin[\[Theta][rfMax, bwdth, Tp, t, np, s]] -
Sin[2*\[Beta]]*(Cos[\[Alpha][rfMax, bwdth, Tp, t, np, s]]^2*
Sin[\[Theta][rfMax, bwdth, Tp, t, np, s]/2]^2);
fyx[rfMax_, bwdth_, Tp_, t_, np_, s_] :=
Sin[\[Alpha][rfMax, bwdth, Tp, t, np, s]]*
Sin[\[Theta][rfMax, bwdth, Tp, t, np, s]] -
Sin[2*\[Beta]]*(Cos[\[Alpha][rfMax, bwdth, Tp, t, np, s]]^2*
Sin[\[Theta][rfMax, bwdth, Tp, t, np, s]/2]^2);
fyy[rfMax_, bwdth_, Tp_, t_, np_, s_] :=
Cos[\[Beta]]^2*Cos[\[Theta][rfMax, bwdth, Tp, t, np, s]] +
Sin[\[Beta]]^2*(Cos[\[Alpha][rfMax, bwdth, Tp, t, np, s]]^2 +
Sin[\[Alpha][rfMax, bwdth, Tp, t, np, s]]^2*
Cos[\[Theta][rfMax, bwdth, Tp, t, np, s]]);

and a vector,

vec = {Ix, Iy}.  (*vec = {0,1} say*)

I want the operation,

newvec = mat . vec.

But I want to do it in such a way that t is divided up into 100
increments. So starting with t = 1/100, I want to evaluate mat and
multiply it by vec. I then want to evaluate mat at t = 2/100 (next
increment) and multiply it by newvec to give a new newvec to which I
want to add vec (previous solution) (Some use of FoldList????)
In the above equations, Tp and bwdth are chosen and then there are two
conditions for s and rfMax. If I want to evaluate rfMax (let s = 0), how
do I go about incrementing rfMax whilst conducting the matrix
multiplication.  The rest of the equations are given below.
Plots of Ix versus rfMax and Iy versus rfMax and s versus Ix and s
versus Iy will be helpful but I think I can manage that. Any comments
are welcome.

Thanks
Yas

b1[rfMax_, Tp_, t_, np_] := rfMax * Sech[(betaN/2) * (1 - (2t/Tp))];
dH[bwdth_, Tp_, t_, np_, s_] := (-bwdth/2) *
Tanh[(betaN/2) * (1 - (2t/Tp)) + s];
be[rfMax_, bwdth_, Tp_, t_, np_, s_] :=
Sqrt[b1[rfMax, Tp, t, np]^2 + dH[bwdth, Tp, t, np, s]^2];
\[Alpha][rfMax_, bwdth_, Tp_, t_, np_, s_] :=
ArcSin[dH[bwdth, Tp, t, np, s]/be[rfMax, bwdth, Tp, t, np, s]];
\[Theta][rfMax_, bwdth_, Tp_, t_, np_, s_] :=
2*Pi*be[rfMax, bwdth, Tp, t, np, s]*t;

```

• Prev by Date: RE: Oh Where, Oh Where Have My Values Gone?
• Next by Date: latex
• Previous by thread: Re: EPS export problem
• Next by thread: Re: Handling several variables at once during matrix multiplications