Problem 51216. Apply mirrored edges to a matrix
Given a matrix MTX of any size and an integer N, apply mirrored edges of size N to the matrix.
e.g.
MTX = [ 1 2 3
            4 5 6
            7 8 9];
N = 1;
OUT = [ 1 1 2 3 3
             1 1 2 3 3 
             4 4 5 6 6
             7 7 8 9 9 
             7 7 8 9 9];
Solution Stats
Problem Comments
- 
		3 Comments
		William
    	on 26 Mar 2021
	
	
  	This is a very peculiar definition of "mirrored" edges. Value are reflected at the top but not the two sides and the bottom.
		Dyuman Joshi
    	on 8 Aug 2021
	
	
  	Not just peculiar but non-uniform as well. Feels more like a pattern the Author made to his liking
		Rafael S.T. Vieira
    	on 6 Nov 2022
	
	
  	That's a bizarre mirror. And as others have pointed out, it seems the first rows are incorrect since they behave differently from the left, right, and bottom mirrors.
Solution Comments
Show commentsProblem Recent Solvers4
Suggested Problems
- 
         
         3054 Solvers 
- 
         
         1314 Solvers 
- 
         
         500 Solvers 
- 
         Solving Quadratic Equations (Version 1) 501 Solvers 
- 
         
         502 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!