Cody

# Problem 42752. Matrix diagonalization

Solution 1729010

Submitted on 18 Feb 2019
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=magic(3); B=[15.000000000000004 0 0 0 4.898979485566359 0 0 0 -4.898979485566358] y_correct=1; assert(isequal(Check_Diag(A,B),y_correct))

Error in solution Line: 2 Column: 7 Invalid expression. Check for missing or extra characters.

2   Fail
A=eye(5); B=eye(5); y_correct=1; assert(isequal(Check_Diag(A,B),y_correct))

Error in solution Line: 2 Column: 7 Invalid expression. Check for missing or extra characters.

3   Fail
A=spiral(2) B=[3 4 4 9]; y_correct=0; assert(isequal(Check_Diag(A,B),y_correct))

Error in solution Line: 2 Column: 7 Invalid expression. Check for missing or extra characters.

4   Fail
A=pascal(3) B=[ 1.127016653792583 0 0 0 2.000000000000000 0 0 0 8.872983346207416] y_correct=0; assert(isequal(Check_Diag(A,B),y_correct))

Error in solution Line: 2 Column: 7 Invalid expression. Check for missing or extra characters.

5   Fail
A=spiral(3) B=[ 15.738398236975144 0 0 0 -3.388172132922506 0 0 0 -1.350226104052633]; y_correct=1; assert(isequal(Check_Diag(A,B),y_correct))

Error in solution Line: 2 Column: 7 Invalid expression. Check for missing or extra characters.