Problem 2695. Toeplitz Matrix
Solution Stats
Problem Comments
-
1 Comment
Wikipedia link (it helped me): https://en.wikipedia.org/wiki/Toeplitz_matrix
Solution Comments
-
1 Comment
my code doesn't work in some cases, sorry.
-
2 Comments
Well Mr. Rifat, this is nice coding but does not fulfill the purpose. I dont know how did this solution checked as correct. Let me tell you about Toeplitz Matrix. A matrix in which all elements of main diagonal are equal and elements of other sub-diagonals parallel to main diagonal are equal. plz check this eg:a=[2 0 7 8 9;3 2 0 7 8;6 3 2 0 7;4 6 3 2 0;1 4 6 3 2]. Your coding still gives true even for non-toeplitz matrix. I'll check my reference solution again. Thanks for your time.
Sorry... I misread the definition. I thought it was only the main diagonal. I will submit another solution. Anyway.. your test suite should contain matrices to prevent such cases.
Problem Recent Solvers181
Suggested Problems
-
Remove all the words that end with "ain"
1851 Solvers
-
Return elements unique to either input
729 Solvers
-
652 Solvers
-
132 Solvers
-
865 Solvers
More from this Author1
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!