Generate a 4 x 4 random integer matrix, save it in the variable mat and perform the following: ( MATLAB)
Generate a 4 x 4 random integer matrix, save it in the variable mat and perform the following:
>>mat=magic(4)
Generate a matrix from the matrix mat that is composed of row 2, row 1 and row 3 of mat
>>mat2 = mat(1:3,)
Generate a matrix from the matrix mat that is composed on column 2 and 3 of mat
>>mat3=mat(,2:3)
Generate a matrix from the matrix mat that starts with column 2 and row 3 and contains all the elements till the end.
>>mat4=mat(3: , 2: )
Get Answers For Free
Most questions answered within 1 hours.