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

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

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 Databases Questions!