Dear @Carl Love, thanks for your feedback.
1- You are right, I corrected the post.
2- I removed local variable K.
3- Yes, it must be "*". I corrected it, too.
4- phii is not an external procedure. I corrected it as you say. ( phi[n, m+s-2*j](t) )
I think the multiplication is commutative and also the matrix is a symmetric matrix.