Question: i should creat the code in matlab according to the instructures in order to get the reslt as it is shown in the simple run

i should creat the code in matlab according to the instructures in order to get the reslt as it is shown in the simple run  i should creat the code in matlab according to the instructures
in order to get the reslt as it is shown in the
simple run CS240 Intro Engineering Programming: Spring 2021 Lab Exercise 05 Due
In Lab, the week of February 21* Main toples: Matrix built-in functions

CS240 Intro Engineering Programming: Spring 2021 Lab Exercise 05 Due In Lab, the week of February 21* Main toples: Matrix built-in functions 1. Open MATLAB 2. Create a Script file named 1.605 m (a) Right click Current Folder title of that window Select New Xe by moving mouse to that option 19 Click on Script in the popup menu (4) Type Labos in the highlight field and hit the enter key (e) Double click the Labs we enter in the Current Folder window. Labes. 1. Use seed 7. 2. Create a 5x5 matrix containing numbers 1-10 using either randio, see it in MI variable. Create a 515 matrix containing numbers 5-12 using either rand, store it in M2 variable * Call CreateNewM function, we Mtand M2 as the input parameters, and store the retumed value in a variable new_M * Call CreateMatrix_sum function, we M2 and new_Mas the input parameters, and store the returned value in a variable matrix_sum. Call PrintMatrix function, use MI, M2, new_Mand matrix_sum as the input parameters, no return value CreateNew_M... 1. Create a new function called CreateNew_M in a script file called Create:New_M.m 2. Setup a return value called new_M. and two input arguments called M1 and M2 * Print Tm in CreateNew_Mfunction." On the command windex. 4 Extract all rows and the 1 and 5 columns from the Mt matrix and store it in veel variable Extract all columns and the 2.4" and Srows from the M2 matrix and store it in vec2 variable 6Merge veel matrix and see matrix to form a new 515 matrix and store it in new_M variable Create Matris sum.m 3. Print "I'm in CreateNew_M function." On the command window. 4. Extract all rows and the 1" and 5th columns from the MI matrix and store it in veci variable. 5. Extract all columns and the 2nd, 4th and 5th rows from the M2 matrix and store it in vec2 variable. 6. Merge veci matrix and vec2 matrix to form a new 5x5 matrix and store it in new_M variable. CreateMatrix_sum.m 1. Create a new function called CreateMatrix_sum in a script file called CreateMatrix_sum.m 2. Setup a return value called matrix_sum, and two input arguments called M2 and new_M 3. Print I'm in Create Matrix_sum function. On the command window. 4. Add the M2 matrix to the new_M matrix and store it in matrix_sum variable. PrintMatrix.m 1. Create a new function called PrintMatrix in a script file called PrintMatrix.m 2. Setup four input arguments called M1, M2, new_M and matrix_sum 3. Print "I'm in PrintMatrix function." On the command window. 4. Print all the above matrices using fprintf on the command window as shown in the Sample Run Submit all the four m-files into Canvas. Sample Run I'm in CreateNew_M function. I'm in CreateMatrix_sum function. I'm in PrintMatrix function. The M1 matrix contains uniform random numbers from 1-10 167 107 869310 51453 831 106 1053110 The M2 matrix contains uniform random numbers 5-12 6611 8 10 981078 1087 1011 108986 88 78 10 The first and last columns of the M1 matrix 17 810 53 86 10 10 The 2nd, 4th and 5th rows of the M2 matrix 98 1078 10 8986 88 78 10 The new matrix generated by merging the extracted rows and columns 1858 10 7 10 3 6 10 9 8 10 7 8 108 986 8 8 7 8 10 The sum of M2 and new_M matrices 7 14 16 16 20 16 18 13 13 18 19 16 17 17 19 20 16 18 16 12 16 16 14 16 20

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!