Problem 42752. Matrix diagonalization
You will be given Two matrices A and B.
Return 1 if B is the diagonal matrix of A, 0 otherwise
Solution Stats
Problem Comments
-
4 Comments
Show
1 older comment
Jean-Marie Sainthillier
on 24 Feb 2016
You can't use isequal with double/float as in tests 1, 4 or 5.
See https://www.mathworks.com/matlabcentral/newsreader/view_thread/66553
Jean-Marie Sainthillier
on 29 Feb 2016
You shouldn't...
Zikobrelli
on 2 Mar 2016
Jean-Marie, sorry , i dont see what you're referring to/ i dont use isequal, i compare the difference to a tolerance
Zikobrelli
on 2 Mar 2016
*the difference's norm*
Solution Comments
Show commentsProblem Recent Solvers39
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15765 Solvers
-
3079 Solvers
-
Sum all integers from 1 to 2^n
17321 Solvers
-
747 Solvers
-
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
395 Solvers
More from this Author12
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!