{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

G- Computer QuestionsExam 1

# G- Computer QuestionsExam 1 - Computer Question 1 Subplot...

This preview shows pages 1–2. Sign up to view the full content.

Computer Question 1: Subplot Write Matlab code that does the following: 1) Begins by setting A = [ 1:10 ; 31:40 ; 26:2:44 ]; 2) Then, your program should calculate the sum of each row of A . If, and only if, the sum of any of the rows of the matrix A is at least 350, your program should display the following two graphs next to each other using subplot, with x containing 243 points running from 1 to 20.: y = x 3 + 2x y = x 4 - 10000 sin(x) Your graph should look like this: Computer Question 2: Class Grades Run the following commands, which create a 100 element row vector b : rand( 'state' , 4 ) ; b = round( 100*rand(1,100) - 10 ); class = ‘Matlab’; Assume that the vector b now contains students’ grades for this class. However, some of the grades were entered incorrectly. Write Matlab code that calculates the minimum, maximum, and average (mean) grades in the class after throwing out (getting rid of) all grades below 0 or above 100. (i.e. a score of 103 should not be included in any of your calculations). Display the following statement

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern