How to do mirror padding to the matrix
I = [1 6 3 3 4 5 1 22 5 7 2 2 2 6 24 4 6 8 3 5 3 85 3 3 4 5 2 2 76 5 2 2 7 6 2 47 1 4 2 3 5 3 32 4 2 4 7 3 3 21 2 4 5 6 2 3 1];
mirror_padding = [1 1 2 4 5 6 2 3 1 12 1 6 3 3 4 5 1 2 12 2 5 7 2 2 2 6 2 28 4 4 6 8 3 5 3 8 47 5 3 3 4 5 2 2 7 54 6 5 2 2 7 6 2 4 63 7 1 4 2 3 5 3 3 72 2 4 2 4 7 3 3 2 21 1 2 4 5 6 2 3 1 11 1 6 3 3 4 5 1 2 1];
When using padarray or imfilter i get different outputs for mirror padded matrix. How to get values as shown in the below image
Best Answer