MATLAB: Overdetermined system of equations

MATLAB and Simulink Student Suitesystem of equations

My equation looks as follows: Y = x1*A + x2*B + x3*C, where Y, A, B, C are matrices of the 260×100 dimension and I want to solve for x1 , x2 , x3 but I'm not sure how to approach this in Matlab. Could someone share some tips with me, please ?

Best Answer

So you have only 3 unknowns.
x123 = [A(:),B(:),C(:)]\Y(:);
This returns a vector of length 3, which is the linear least squares solution.