Solved
Your matrices should not be all named the same (k.1)
As you have a variable number of matrices (all with the same number of columns) you could store them in k[1, k[2, etc. and I mean vector/matrix indices here, not literal ones.
Now you could do it that way

Welcome to the PTC Community
No account yet? Create an account
Please use your PTC eSupport account.
LoginEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.

