Question: This is Matlab Programming problem. Please me, to find solution 4. Write a function with header (M1, M2] = mySplit Matrix(M), where M is a

This is Matlab Programming problem. Please me, to find solution

This is Matlab Programming problem. Please me, to find solution 4. Write

4. Write a function with header (M1, M2] = mySplit Matrix(M), where M is a matrix, M1 is the left half of M, and M2 is the right half of M. In the case where there is an odd number of columns, the middle column should go to M1. Hint: The size function will be useful for this. Assume that M has at least two columns. Test Cases: 4 >> M = [1 2 3; 4 5 6; 7 8 9] M = 1 2 3 5 6 7 9 >> [M1, M2] mySplit Matrix (M) M1 1 2 5 7 8 M2 = 3 6 9 4 >> m = ones (5,5); >> [ml, m2] mySplit Matrix (m) ml 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 m2 1 1 1 1 1 1 1 1 1 1

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!