Perhaps you’d care to tell us what v^e is? What are v and e? Why do you say y ∈ R^m but declare y as a scalar` variable? Please ensure after everything is defined, that the objective function evaluatea to a scalar.

v^e is a vector. Sorry, this is a bad name. It seems it has 2 different value e and v but actually it is “vector of emprical model” so it is a vector and M is a matrix