Question: Question # 1 Given the following matrix: H = randi ( [ - 1 0 , 1 0 ] , 5 ) Using only matrix

Question #1
Given the following matrix:
H = randi([-10,10],5)
Using only matrix operations. For full credit you must minimize the number of operations.
Create a new matrix (J) that contains only rows 1,4 and 5
Create a new matrix (K) that contains only columns 1,4 and 5
Question #2
Using only matrix operations. For full credit you must minimize the number of operations.
Create a 4x3 random matrix A. Do NOT use the randi() function...use rand().
Get those elements of A that are in rows 3 to 4 and columns 2 to 3 and create matrix B from those
elements.
Add a fourth column to A and set it equal to the first column of A.
Replace the last 3x3 submatrix of A (rows 2 to 4, columns 2 to 4) with a 3x3 identity matrix.
Delete the first and third rows of A.
Round off all entries of A

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