G- Computer QuestionsExam 1

G Computer - 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

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

View Full Document Right Arrow Icon
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
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/29/2012 for the course 440 127 taught by Professor Blase during the Fall '09 term at Rutgers.

Page1 / 2

G Computer - 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

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online