I have a list of matrices, called $matList$, which are sequentially multiplied by another matrix $G$. I created a slider for $matList$, but the slider does not work. Here is the Code
.
Clear[a, t, matList, G, solG, solGTr, mat];
Manipulate[
SeedRandom[2];
a = RandomReal[{0, 1}, {3, 5}];
t = RandomReal[{0, 1}, {3, 5}];
matList =
Table[(# - DiagonalMatrix[Diagonal[#]]) &[
KroneckerProduct[a[[i]], t[[i]]]], {i, 1, 3}];
G = {{0, 1, 0, 0, 1}, {1, 0, 0, 1, 1}, {1, 0, 0, 1, 0}, {0, 1, 1, 0,
0}, {1, 0, 0, 1, 0}};
solG = G*mat;
solGTr = Transpose[solG];
Grid[{
{Text["matrix solG"], Text["transpose of solG"]}, {solG, solGTr}
}],
Row[{Control[{mat, matList, Animator, AnimationRunning -> False}]}]
]
The problem in the above Code
lies in Row[{control[{mat,matList,...}]
. A similar construct for a slider of a list of numbers works, though.
solG = G*mat
withsolG = G*matList[[k]]
, andRow[...]
with{{k, 1}, 1, Length@matList, 1, Animator, AnimationRunning -> False}
. $\endgroup$