MATLAB: What is the difference between PINV and MLDIVIDE when I solve A*x=b

MATLAB

I would like to know the difference between PINV and MLDIVIDE when I solve A*x=b

Best Answer

When the system A*x = b is overdetermined, both algorithms provide a similar answer. When the system is underdetermined, PINV will return the solution x, that has the minimum norm (min NORM(x)). MLDIVIDE will pick a solution which has at most m nonzero components for an m-by-n matrix A.