Question: How to evaluate a matrix or vector using the values of another vector

restart:
A:=Vector(<2*u[1]+u[2],3*u[1]+u[3],5*u[2]-u[3]>);
U:=<1,2,3>;
for i to 3 do
A:=eval(A,u[i]=U[i]);
od;

How can I do this in a simpler and faster way? I will do this procedure for many times with larger vecotors and matrices.

TIA

 

Please Wait...