Problem 451. Is this matrix orthogonal?
perhaps you could these cases to avoid some non-general solutions... TEST1: x=sqrtm([2,1;1,1]); y_correct=false; TEST2: x=randn(3); y_correct=false;
Thanks for the suggestions. I have implemented both of the tests. Cheers.
The threshold 1.1 is hard coded. It would be better to use rounding off to nearest integer to ensure robustness. A false positive can occur where a non-orthogonal matrix with norm 1.05 is returned as orthogonal from this function
I believe the test cases are wrong, I could not prove that a matrix from randn(3) is orthogonal.
Problem Recent Solvers310
Get the length of a given vector
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
More from this Author16
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!