This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: 8-A.2function courseGrade_VECTOR = Prob8_A_2(numericalScore)% converts a vector of numerical scores to a vector or% corresponding course grades using the following:% score < 60 yields 0.0,% 60 <= score < 70 yields 1.0% 70 <= score < 80 yields 2.0% 80 <= score < 90 yields 3.0% 90 <= score yields 4.0% INPUTS: numericalScore: numerical score% OUTPUTS: courseGrade_VECTOR - a vector containing both% the numerical score, and course gradeif numericalScore < 60courseGrade = 0.0;elseif (60 <= numericalScore) & (numericalScore < 70)courseGrade = 1.0;elseif (70 <= numericalScore) & (numericalScore < 80)courseGrade = 2.0;elseif (80 <= numericalScore) & (numericalScore < 90)courseGrade = 3.0;elseif (90 <= numericalScore)courseGrade = 4.0;elseerror('bad numerical score')endcourseGrade_VECTOR = [numericalScore, courseGrade];8-A.5function vector = Prob8_A_5(angle)% Function that takes an input angle and computes the sin, cosine and the% quadrant that the angle is located% INPUT: angle in degrees% OUTPUT: Quadrant number, sine of angle, and cosine of angle...
View Full Document
This homework help was uploaded on 03/30/2008 for the course CSE 131 taught by Professor Sticklen during the Spring '08 term at Michigan State University.
- Spring '08