Question: Please create a function using MATLAB for the two different matlab codes/scripts above. One is named ex4.m (shift rows in a given matrix) and the

Please create a function using MATLAB for the two different matlab codes/scripts above. One is named ex4.m (shift rows in a given matrix) and the other one ex3.m (shift columns in a given matrix).
ex4.m input [8,1,6:3,5,7;9,4,2] output-zeros (size (input)); output (1, :)-input (end..);% save the last row for 1-2: size (input, 1) % from 1 to the num Example 4 5 output (i,:)- input(i-1,:); end output ex3.m xe input-[8,1,6;3,5,7;4,9,2] Output-zeros (size (input)); Output (:,1) -input (:,size (input,1)); for i-2:size (input,1) 1 Example 3 4 5 Output (:, i)-input(:,i-1); - end Output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
