Cody

Problem 2130. Orthonormal matrix

Solution 2298659

Submitted on 19 May 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
a=[1 0 0 ;0 1 0;0 0 1] tf = 1; assert(isequal(ortho_normal(a),tf))

Error in solution: Line: 19 Column: 24 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.

2   Fail
a=[0 0 1 0;0 1 0 0;1 0 0 0;0 0 0 1] tf = 1; assert(isequal(ortho_normal(a),tf))

Error in solution: Line: 19 Column: 24 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.

3   Fail
a=eye(20) k=a; p=a; a(:,1)=k(:,end); a(:,end)=k(:,1); a(:,5)=p(:,9); a(:,9)=p(:,5) tf = 1; assert(isequal(ortho_normal(a),tf))

Error in solution: Line: 19 Column: 24 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.

4   Fail
a=[1 0 1 0;0 1 0 0;1 0 0 0;0 0 0 1] tf = 0; assert(isequal(ortho_normal(a),tf))

Error in solution: Line: 19 Column: 24 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.

5   Fail
a=[0 0 2 0;0 1 0 0;1 0 -1 0;0 0 0 1] tf = 0; assert(isequal(ortho_normal(a),tf))

Error in solution: Line: 19 Column: 24 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.

6   Fail
a=[1 2 3 ;1 1 5;3 0 1] tf = 0; assert(isequal(ortho_normal(a),tf))

Error in solution: Line: 19 Column: 24 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.

7   Fail
a =[1 0 0 ;0 0 0; 0 0 0] tf = 0; assert(isequal(ortho_normal(a),tf))

Error in solution: Line: 19 Column: 24 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.

Suggested Problems

More from this Author21