Congratulations you have all missed the point.
OP, so IF your first set of equations was well defined, basically what you have is a matrix multiplication Ax=y where A is a square matrix of coefficients, x is a column vector of input variables, and y is a column vector of output variables, as you have addressed previously. Your second set of equations takes the form Bx=z where B is not necessarily square, but has as many columns as equations you want to compute. In a perfect world, we solve for x via a matrix inverse and plug that into the second equation, giving us z=B(A^-1)y. Easy enough to do this in MATLAB.
However, your system is not well defined, so you cannot compute an inverse for A. What you CAN do is compute a pseudoinverse. You can read more about it here, but I will summarize for you:
https://en.wikipedia.org/wiki/Moore%E2%80%93Penrose_inverse
In this definition, a pseudoinverse of an (m x n) matrix A is given by an (n x m) matrix A^+ and satisfies the criteria:
1) A * (A^+) * A = A
2) (A^+) * A * (A^+) = A^+
3) A * (A^+) and (A^+) * A are Hermitian
Some nice things about this pseudoinverse. It exists and is unique. It equals the usual inverse when A is invertible. If A has linearly independent rows (as your matrix does), then you have an explicit formula:
A^+ = [(A*A)^(-1)]A*
Here, I've abused notation representing A* as the conjugate transpose of A. Now you can't just plug in A^+ in place of A^-1 to solve for x because that would imply some determinacy in your system (a proper solution will acknowledge that x is not unique), but what you do have is a formula:
x=(A^+) * y + [I - (A^+) * A] * w
Here, I is the proper size identity matrix and w is ANY vector. Solutions exist if and ony if A * (A^+) * y = y (which you should have). Now you can substitute this expression into the second equation and find:
z = B * [(A^+) * y + [I - (A^+) * A] * w]
I'm not going to do your examples for you, but I've given you an explicit formula for the pseudoinverse and the rest is plug and chug. What you should find is that in your case the matrix B * [I - (A^+) * A] is a matrix with its bottom row equal to zero. That this row equals zero implies that the last equation in B is well defined for your system and the arbitrary vector w does not come into play.