       Questions on evaluate matrix operations

• To: mathgroup at smc.vnet.net
• Subject: [mg92913] Questions on evaluate matrix operations
• From: rac00n <rac00nza at gmail.com>
• Date: Sun, 19 Oct 2008 05:40:11 -0400 (EDT)

```Hi all,

I've given up on another system and I have a Mathematica question for you.
Please bare with me as this is the first time I'm using Mathematica
for anything else besides plotting.

Here is my program so far:

n = 1;
m = 10;
f[x_] := Sin[x*Pi];

l = 0;
t = 0;
a = 1;
h = 0.1;
k = 0.01;
LAMDA = a*a*k/(h*h);

w = {T};
count = 1;
Do[w = Append[w, f[count*h]]; count++, {m - 1}];
w

A1 = {0};
count = 0;
Do[A1 = Append[A1, 1 + 2*LAMDA]; count++, {m}];
count;
A1 = Drop[A1, 1];

A2 = {0};
Do[A2 = Append[A2, -LAMDA], {m - 1}];
A2 = Drop[A2, 1];

A = MatrixForm[
DiagonalMatrix[A2, -1] + DiagonalMatrix[A1] +
DiagonalMatrix[A2, 1]];
Ainv = Inverse[A];

count = 0;
Do[wN = Evaluate[A.w]; Print["W[", count, "]: ", wN]; w = wN;
count++, {n}];

This gives the following output:

the Matrix "A" dot the vector "w"

If I Select the output and choose "Evaluate in Place/Cell" the
following output is shown:

{-0.30901699437494734`, 0.3392657308323691`, 0.6453217681275247`, \
0.8882092145372158`, 1.0441525545105133`, 1.0978869674096932`, \
1.0441525545105133`, 0.8882092145372158`, 0.6453217681275247`, \
0.33926573083236944`}

How can I force: wN = Evaluate[A.w] to always be fully evaluated? Even
though I have Evaluate[%] it still shows the full explicit answer. I
want to flatten/reduce the the result. Everything I've tried so far
does not work. Any ideas?

Kind Regards,
Miguel

```

• Prev by Date: Re: FindFit, Weibull
• Next by Date: Pi Formula
• Previous by thread: Re: anova help__
• Next by thread: Re: Questions on evaluate matrix operations