I am looking for MATLAB code to determine the number of solutions (0, 1, Inf) of a system of linear equations (m equations for n variables, e. g.
A=[2,1,3;0, -1,5];b=[-3;1]x=A\b
which has infinitely many solutions.
While the answer for the m=n case is given in this excellent post making use of the rank() function I wonder how it can be solved in the general case (m=n, m>n, m<n).
Best Answer