Return all non-identical orientations of a 2-D matrix that can be produced by rotating or flipping it.
Input is an M-by-N matrix. You can assume integer values and no empty rows or columns.
Output is a 1-by-P cell array containing P unique M-by-N or N-by-M matrices.
Ordering of the output matrices does not matter, as long as there are no repetitions.
Example:
{ [2 0;2 2] , [0 2;2 2] , [2 2;0 2], [2 2;2 0] } = rotflip2d([2 0;2 2])
Background:
This function will be useful for the IQpuzzler challenge on Cody.
Solution Stats
Solution Comments
Show comments
Loading...
Problem Recent Solvers6
Suggested Problems
-
Back to basics 16 - byte order
202 Solvers
-
Sort numbers by outside digits
163 Solvers
-
Find the maximum number of decimal places in a set of numbers
3609 Solvers
-
Generate a vector like 1,2,2,3,3,3,4,4,4,4
14365 Solvers
-
12354 Solvers
More from this Author5
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!