Unit11 LAB B - 7-B.1function convTable = Prob7_B_1(F...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: 7-B.1function convTable = Prob7_B_1(F)% creates a conversion table from the given vector of% Fahrenheit degrees to Centigrade degrees% INPUT: F, a 1xn row vector of F temperatures% OUTPUT: convTable, an nx2 array which consists of [F C]convTable = [F' (F'-32)/1.8];7-B.2function [finalGrades, classAvg, tops] = Prob7_B_2(aTable)% finds the final grades, class average, and the student number% of the top scoring student given individual examination scores% INPUT: aTable, an nx5 array of student numbers, midterm, homework,% term project and final examination grades,% arranged in columns% OUTPUTS: finalGrades, an nx2 array of student numbers and final grades% classAvg, a scalar class average% tops, a scalar student number of the top scoring studentfinalGrades = 0.3*aTable(:,2)+0.2*aTable(:,3)+0.2*aTable(:,4)+0.3*aTable(:,5);stuNumbers = aTable(:,1);classAvg = mean(finalGrades);tops = stuNumbers(find(finalGrades==max(finalGrades)));finalGrades = [aTable(:,1) finalGrades];7-B.3function anArray = Prob7_B_3(anArray)% appends the input array with column sums, row sums,% and overall sum% INPUT: anArray, an nxm array% OUTPUT: anArray, an (n+1, m+1) array arranged such that:% [input_array sum_of_rows;% sum_of_columns sum_of_all_numbers]anArray = [anArray sum(anArray,2); sum(anArray) sum(sum(anArray))];...
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.

Page1 / 3

Unit11 LAB B - 7-B.1function convTable = Prob7_B_1(F...

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