Question: Write a function called Shifter that takes a 2 D array inArray and i ) creates an array circLeft that contains the circular left shift

Write a function called Shifterthat takes a 2D array inArray and i) creates an array circLeft that contains the circular left shift by one position of all the columns of inArray in a 2D array, ii) creates an array called circUpthat contains the circular up shift by one position of all the rows of inArray, and iii) creates an array called circ2xthat first circularly shifts the columns of inArray by one position, and with the resulting array, shifts all the rows up by one position. The function must operate on a 2D array of any size.
Hint: Array indexing, single colon and end should be used.
Restrictions:For loops, while loops, circshift, and any other internal functions should not be used.
Hint: The internal functions sortand reshape should be used.
Restrictions:Loops should not be used.
Ex:
inMat =[
819811
1761216
1216219
111623];
[outMat]= CustomSort( inMat )
produces
outMat =
2236
881111
12121616
16171919

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!