I have a matrix equation of the form AX = B. A and B are of size 1000x3 that I know. I want to cacluate X, which is a 3x3 matrix. However, some terms of this matrix are zeros and ones. i.e. X is of the form [a 0 b; 0 c d; 0 0 1];
When I calcualte X = A\B, I get good approximations for a, b, c and d, but the values that I expect to be zeros are really small numbers.
Is there a way to constrain some of the parameters to be zeros?