i have a matrix like this:
F := Table[Subscript[f, i, j], {i, 3}, {j, 3}]
c=F.F
my question is that how to convert the components of c to this form Subscript[f, i, j]->f(i,j) when i am using FortranForm?
I don't know what do you expect from Lists
but here is a quick solution:
FortranForm[c /. Subscript -> (#[##2] &)]
Edit:
dear Kuba i am looking for something like this : c(1,1)=f(1,1)^2+f(1,2)*f(2,1)+f(1,3)*f(3,1) and so on. –
Column @ Flatten @ MapIndexed[
StringTemplate["c(``,``) = ``", InsertionFunction -> ToString
][
Sequence @@ #2, FortranForm[# /. Subscript -> (#[##2] &)]
] &
, c
, {2}
]