MATLAB: How to catch warnings

inversematrixwarning

I want to catch Warning: Matrix is close to singular or badly scaled, during a matrix division A/B.

Best Answer

may help with this. Credit to Guillaume from this answer for the link.
Related Question