This is the basic C++ program of C++ armadillo library which shows how to get the condition of matrix. It can be carried out by the help of inbuilt function "cond"in armadillo library. It takes one parameter i.e input matrix name.
Return the condition number of matrix A (the ratio of the largest singular value to the smallest)
Large condition numbers suggest that matrix A is nearly singular
The computation is based on singular value decomposition; if the decomposition fails, a std::runtime_error exception is thrown
The rcond() function is faster for providing an estimate of the reciprocal of the condition number
Comments