Check if two matrices are permutations of each other - MATLAB Cody - MATLAB Central

Problem 43079. Check if two matrices are permutations of each other

Difficulty:Rate

Your function should return true for the elements of one matrix is the permutation of the other matrix:

x = [1 2 3; 4 5 6; 7 8 9]
y = [3 5 6; 7 1 2; 4 9 8]

or

x = [1 2; 3 4; 5 6]
y = [1 2 3; 4 5 6]

Please note that the matrices can have different shapes or sizes!

Solution Stats

54.47% Correct | 45.53% Incorrect
Last Solution submitted on Apr 29, 2025

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers56

Suggested Problems

More from this Author3

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page