Federico - the line of code that generates the error is
because you are trying to assign a 2x2 matrix (the right-hand side) to a 1x1 scalar (the left-hand side). What are you expecting y to be? A set of 2x2 matrices or are you hoping it to be a scalar? Your subsequent line of code seems to assume that y is a scalar where you refer to y(t). You may want to reconsider the above calculation.