Question: Quiz 3 CS151-Fall 2017 Your Name: TA's Name: Grade: 2 pts (completed in class) 12 pts 5pts (program)19T Directions: Circle all answers that apply using

 Quiz 3 CS151-Fall 2017 Your Name: TA's Name: Grade: 2 pts

Quiz 3 CS151-Fall 2017 Your Name: TA's Name: Grade: 2 pts (completed in class) 12 pts 5pts (program)19T Directions: Circle all answers that apply using the following three matrices As[12 17 3 61, B-I5 8 3; 1 23:246], c=[22; 17; 4] 1. How would you assign only the second column of matrix 8 to variable X1? a. x1 -B(11-31.2) b.x1 -B(:,2) c. X1 - B(1:end, 2) How would you assign the second and third columns and second and third rows of 8 to variable x2 (which creates the matrix 12 3; 4 6))? a. X2 B(2:3,2:end) b. x2 - B(2-end, 2-end) c. x2 B(12:31,12,3]) d. x2 B(12:end),2:end) 2. 3. How would you assign all of B as the 1" through 3" rows (with three columns) and the last three values of A as the last row to variable x3? C. X3- [B, A(2 : end)). 4. How would you assign the values in C as the 1" column (with three rows), the values in B as columns 2, 3 and 4 (also with three rows), and the values in A as the last row to variable X4? c.x4 IC: B: A] 5. How would you convert B to a single row vector? d. B(1:end) Write a MATLAB program that loads a text file called citydota.txt that contains monthly dlimate data of a US city for a full year (with each row representing one month). The columns you need are columns4 (containing the highest monthly temps) and 5 (containing the lowest monthly temps). Find the average of the highest and lowest monthly temps for the year. For 4 extra credit points, determine the month numbers (1 for January, 2 for February, etc) with the highest and lowest temps. Note: you only need to write the code

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!