I have a code for Matrices in Maple.
Can we transform the Maple code to Mathematica code?
M:= Matrix
( n,
n,
shape=identity
)
+
alpha*Matrix
( n,
n,
(i,j)->sin(i*Pi*nu*t/l)*sin(j*Pi*nu*t/l)
):
C:= 2*alpha*Matrix
( n,
n,
(i,j)->(j*Pi*nu/l)*sin(i*Pi*nu*t/l)*cos(j*Pi*nu*t/l)
):
K:= Matrix
( n,
n,
(i,j)-> `if`( i=j,
(j*Pi/l)^4*E*J/(rho*A)+(j*Pi/l)^2*N/(rho*A),
0
)
)
-
alpha*Matrix
( n,
n,
(i,j)->(j*Pi*nu/l)^2*sin(i*Pi*nu*t/l)*sin(j*Pi*nu*t/l)
):
VV:= Vector[column]
( n,
j->V[j](t)
):
FF:=Vector[column]
( n,
j->F[j](t)
):
PP:= P/(rho*A)
*
Vector[column]
( n,
j->sin(j*Pi*nu*t/l)
)+FF:
params:=( indets(sys1, name)
minus
{Pi,t}
)=~1:
ics:= [ Equate
( eval(VV,t=0),
Vector[column]
( n,
fill=0
)
)[],
Equate
( convert(eval(diff~(VV,t),t=0),D),
Vector[column]
( n,
fill=0
)
)[]
]: