I am asked to solve the equation: Ax = B for two randomly generated matrices. Furthermore, I am instructed that the script should return if no solution is found.
Here is my code:
n=100;A=randn(n);B=randn(n);x = A\B;
I believe I know how to solve the equation, but don't know how to return if no solution is found. Is there a different way that I should be writing this? If not, how to I return if no solution is found?
Best Answer