Original Post
I am trying to develop enlarge an 2D array by padding column and row values in a mirror fashion. For example A = |1 2 3 4| |1 2 4 5| |1 4 5 7| After padding first 2 rows through mirroring, I should get new enlarged 2D array A' = |1 2 4 5| ------> Second row of A |1 2 3 4| ------> First rows of A |1 2 3 4| |1 2 4 5| |1 4 5 7| Now I pad and mirror first and second column to A', then new enlarged array A'' = |2 1 1 2 4 5| |2 1 1 2 3 4| |2 1 1 2 3 4| |2 1 1 2 4 5| |4 1 1 4 5 7| Can anyone suggest some ideas involved in doing this operation, My Function will recive the columns and rows to be repeated. For the time being, I am considering addition from the left(pre) and not post operation. Please suggest some ideas.