Problem 2241. Compare two input matrices
Solution Stats
Problem Comments
-
1 Comment
Dyuman Joshi
on 9 May 2021
Test suite has been improved by adding new test cases.
Solution Comments
-
1 Comment
Muhtasim Haque Nahian
on 8 May 2021
improve the test suite please. You can easily solve this problem with the undermentioned code, which is actually incorrect but passes the test suite.
function flag = CompareMatrix(A,B)
if sum(A,'all') > sum(B,'all')
flag = 1
else flag = 0
end
end
Problem Recent Solvers326
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
14600 Solvers
-
1475 Solvers
-
Arrange Vector in descending order
7976 Solvers
-
461 Solvers
-
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
351 Solvers
More from this Author2
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!