Question: MATLAB (a) Generate a row vector of 20 random real numbers, each in the range (-7, 9), and assign the vector to variable a. (b)

MATLAB

MATLAB (a) Generate a row vector of 20 random real numbers, each

(a) Generate a row vector of 20 random real numbers, each in the range (-7, 9), and assign the vector to variable a. (b) Modify vector a by rounding down each of its elements (to the nearest integer number towards negative infinity). (c) Refer to the 5th element of vector a and change its value to 33. (d) Without assuming the number of elements of vector a, modify the vector by deleting its last three elements. (e) Generate a 17 x 10 matrix of random integers, each in the range [-5, 10], and assign the matrix to variable M. (f) Modify the matrix M by replacing its 4th column with the transpose of vector a. (g) Modify the matrix M by raising all its elements to the power of 2. (h) Modify the matrix M by exchanging the positions of the 2nd and 8th rows (in other words, swap the 2nd and 8th row in the matrix). (i) Modify matrix M by assigning n to all elements containing a value less than 0. (j) Without assuming the dimensions of the matrix M, create a matrix A comprised of all the even rows of matrix M. (k) Without assuming the range of values in matrix A, determine how many elements of A are evenly divisible by 3 (no remainder after division by 3) and assign the determined number to variable d

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!