Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions

Question

What is moral hazard and how might it affect entrepreneurial firms?

Answered: 1 week ago

Question

Explain the Pascals Law ?

Answered: 1 week ago

Question

What are the objectives of performance appraisal ?

Answered: 1 week ago

Question

State the uses of job description.

Answered: 1 week ago

Question

1. How does Kiwi Experience maintain a continual customer focus?

Answered: 1 week ago