Question: Why this procedure does not work to get the numerical values?

Where is the problem within this procedure which I can not get the numerical values of V[1] , V[2], ...

restart

A := Matrix([[2*t, 2, 3], [4, 5*t, 6], [7, 8*t, 9]])

A := Matrix(3, 3, {(1, 1) = 2*t, (1, 2) = 2, (1, 3) = 3, (2, 1) = 4, (2, 2) = 5*t, (2, 3) = 6, (3, 1) = 7, (3, 2) = 8*t, (3, 3) = 9})

(1)

B := LinearAlgebra:-Transpose(Matrix([t, 2*t, 3*t]))

B := Matrix(3, 1, {(1, 1) = t, (2, 1) = 2*t, (3, 1) = 3*t})

(2)

``

test:=proc(n)
  local s,t,M,V;
  s:=1:
  for t from 1 to n do
    M:=A+A^(-1);
    V[s]:=(M.B):
    s:=s+1:
  end do;
  V;
end proc:

``

test(4)

V

(3)

V[1]

V[1]

(4)

``

``

Download ProcPropl.mw

Please Wait...