I'm not quite sure how to ask this question, but here is a case boiled down to the simplest features (this is part of a much more complex system)
Suppose I have scalar variable M(k) in Simulink that switches discretely from 0 to 1 every 10 seconds.
Now suppose I have a matrix M(k) that is a function of K, that is
[ 1 k; k 8 ]
(this is totally arbitrary for the sake of example) and I want to multiply it by a vector X.
x --->[ M(k) ]---> M(k)*x
Naturally, I would like to place "M" in a "gain" block and set it to Matrix-vector multplication. Is it possible to update "M" if we specify the variable "k" inside of the "gain" block?
I can implement matrix multiplication as multiplying and adding up a bunch of stuff together, but as this is an O(n^3) problem...
I would prefer to do it in one shot. Is it possible?