Hello,
i need help to translate a system which is given below to a for loop.
Other wise i am writing it with myself.
instead of doing it like that
with(LinearAlgebra);
sys := [galerkin_funcs[1], galerkin_funcs[2], galerkin_funcs[3], galerkin_funcs[4], galerkin_funcs[5], galerkin_funcs[6], galerkin_funcs[7], galerkin_funcs[8], galerkin_funcs[9], galerkin_funcs[10]];
var := [w[1], w[2], w[3], w[4], w[5], w[6]];
Kmat, Fmat := GenerateMatrix(sys, var);
i want to do it like that.
N:=10
for i to N+4 do
sys(1,i) := galerkin_funcs[i]
end do
for i to N do
var(1,i) := w[i]
end do
After that i will generate matrix with this comman Kmat, Fmat := GenerateMatrix(sys, var);
But this for loop i wrote is not doing the i want to do.
Thanks for your help.