Question
MATLAB already did task 1-4 , need 5-12 THANK YOU Task #1: Generate a 6x2 matrix (6 rows, 2 columns) with random whole numbers between
MATLAB already did task 1-4 , need 5-12 THANK YOU
Task #1: Generate a 6x2 matrix (6 rows, 2 columns) with random whole numbers between 1 and 9 using the randi function. Name this mat1. mat1 = randi(6,2);
Task #2: Generate a 6x3 matrix (6 rows, 3 columns) with random whole numbers between 1 and 9 using the randi function. Name this mat2. mat2 = randi(6,3);
Task #3: Concatenate mat1 and mat2 horizontally to create a 6x5 matrix called mat3. % Add code for task here
Task #4: Modify mat1 to add another column using horizontal concatenation. You can create another column by using the randi function again to generate whole numbers between 1 and 9. Remember that in order to add another column to mat1, it will need to be the same height (number of rows) as mat1 already has. After you have added the additional column, mat1 should now be a 6x3 matrix.
Task #5: Concatenate mat1 and mat2 vertically to create a 12x3 matrix called mat4. If you receive an error in this task, make sure that mat1 was properly modified in Task #4.
Task #6: Update the element in the 3rd row and 4th column of mat3 to 1000
Task #7: Update the element in the last row and last column of mat4 to 500
Task #8: Replace the 4th row of mat3 with all zeros.
Task #9: Similar to the class presentation, replace the top right-hand corner of elements (2 rows and 2 columns) in mat3 with task9Mat.
Task #10: Reshape mat4 to be a 6x6 matrix using the reshape function.
Task #11: Replicate task9Mat using repmat to generate a 8x8 matrix called task11Mat.
Task #12: Replicate task9Mat using repelem to generate a 10x14 matrix called task12Mat.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started