{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

grades - l ╩lculate combined grade for homework and quizzes...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
function[] = grades() f %Calculate current course average for EAS4200C clc; clear all; close all; c %Change your grades accordingly in the matrices below %Enter HW and quiz grades (Enter as many hw and quiz grades received in the matrix %below) hw=[88 95 90 100 40 100 100]'; quiz=[0 50 0 50 55 95 7]'; q %The number (1 or 2) of worst quizzes that are not counted. Use ndrop=1 until the second exam. ndrop=1; n %Enter exams, projects, and participation(for participation estimate the %number at the end of the semester) %As you get more grades for exam or project keep adding them in the matrix exam=[51 80 76]'; project=[95 50 85 80]'; particip=10; p % grade ranges lower=[93 90 87 83 80 77 73 70 67 63 60 0]; letter={'A' 'A-' 'B+' 'B' 'B-' 'C+' 'C' 'C-' 'D+' 'D' 'D-' 'E'};
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: l %Calculate combined grade for homework and quizzes hwq=quiz+0.15*hw; nhw=size(hw,1); n %Calculate quiz-hw average dropping the lowest ndrop scores if ndrop==1 hwqmean=(sum(hwq)-min(hwq))/(nhw-1); else hwqsort=sort(hwq); hwqmean=(sum(hwq)-min(hwq)-hwqsort(2))/(nhw-2); end % Calculate effective participation score (only 30% for 6-10, and none for more than 10). particip=min(particip,10.); if particip>5 particip=5+0.3*(particip-5); end e %Calculate course score score=0.3*hwqmean+0.6*mean(exam)+2*particip+2*sum(project)/100. %Corresponding letter grade igrade=find(score >=lower); grade=letter(igrade(1))...
View Full Document

{[ snackBarMessage ]}