Question: 3. (20 points) Given are a 4 x 4 matrix A, a 3 x 5 matrix B, and a 7-element vector C. A= r2

3. (20 points) Given are a 4 x 4 matrix A, a 3 x 5 matrix B, and a 7-element vector C. A= r2 1 3 15 6 10 141 11 21 31 69 12 13 21 29 4 9 14 19 241 B= 12 13 14 15 16 11 22 33 44 55] C=[65 63 61 59 57 55 53] Create the three arrays in the command window (using colon notation), and then, by writing one command for each of the following, replace a) the last two columns of the first and second rows of A with the second and third columns of the first two rows of B b) the last two columns of the second row of A with the elements of 4 through 5 of C, c) and the last two columns of the third row of A with columns of 4 through 5 of the second row of B. 4. (15 points) Write a script M-file to create a matrix called km_to_ft composed of two columns, the first giving the values in km and the second one giving the corresponding value in ft. First, specify an appropriate numerical display format. Then, create a variable named km, which holds 30 uniformly distributed random numbers between 0 and 200. Then, perform the conversion. Make sure to display your data in scientific 5-digit format. Save the matrix (named km_to_ft) to a file called km2ft.dat.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
