I have a 3x3 matrix of functions. It looks like
k1[xx_]:={
{k1[1,1][xx],k1[1,2][xx],k1[1,3][xx]},
{k1[1,2][xx],k1[2,2][xx],k1[2,3][xx]},
{k1[1,3][xx],k1[2,3][xx],k1[3,3][xx]}
}
(It's symmetric on the first two arguments.) I want to replace all of the k1[i,j]
functions with different functions. What I want to do is, basically
Flatten[Table[
k1[a, b] -> (1/c^4 k1c4[a, b][#] &), {a, 1, 3}, {b, 1, 3}]]
or with slightly different syntax
Flatten[Table[
k1[a, b] -> Function[xx,1/c^4 k1c4[a, b][xx]], {a, 1, 3}, {b, 1, 3}]]
Neither of these work. Instead of a matrix
{
{k1c4[1,1][xx],k1c4[1,2][xx],k1c4[1,3][xx]},
{k1c4[1,2][xx],k1c4[2,2][xx],k1c4[2,3][xx]},
{k1c4[1,3][xx],k1c4[2,3][xx],k1c4[3,3][xx]}
}
I get a matrix
{
{k1c4[a,b][xx],k1c4[a,b][xx],k1c4[a,b][xx]},
{k1c4[a,b][xx],k1c4[a,b][xx],k1c4[a,b][xx]},
{k1c4[a,b][xx],k1c4[a,b][xx],k1c4[a,b][xx]}
}
which is meaningless because a
and b
aren't defined anywhere.
How can I make the replacement list I want using something like Table
?