Given a square matrix, a, determine whether it is orthogonal.
INPUT: a, a n x n matrix
OUTPUT: true or false
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.
I believe the test cases are wrong, I could not prove that a matrix from randn(3) is orthogonal.
Check to see if a Sudoku Puzzle is Solved
232 Solvers
Return unique values without sorting
488 Solvers
Sum of first n terms of a harmonic progression
190 Solvers
205 Solvers
206 Solvers