AllFreePapers.com - All Free Papers and Essays for All Students
Search

Grades Calculation in Matlab

Autor:   •  December 21, 2015  •  Study Guide  •  263 Words (2 Pages)  •  1,146 Views

Page 1 of 2

GRADES=A

conversion=[0.3 0.3 0.4]';

grade=GRADES*conversion

for i=1:x

if grade(i,:)<=100 && grade(i,:)>=90

fprintf('The result for student number %d\n',i)

Total_Point=grade(i,:)

fprintf('PASS and Grade is A\n')

elseif grade(i,:)<90 && grade(i,:)>=80

fprintf('The result for student number %d\n',i)

Total_Point=grade(i,:)

fprintf('PASS and Grade is B\n')

elseif grade(i,:)<80 && grade(i,:)>=70

fprintf('The result for student number %d\n',i)

Total_Point=grade(i,:)

fprintf('PASS and Grade is C\n')

elseif grade(i,:)<70 && grade(i,:)>=60

fprintf('The result for student number %d\n',i)

Total_Point=grade(i,:)

fprintf('PASS and Grade is D\n')

elseif grade(i,:)<60 && grade(i,:)>=0

fprintf('The result for student number %d\n',i)

Total_Point=grade(i,:)

fprintf('FAİL and

...

Download as:   txt (1.1 Kb)   pdf (43.9 Kb)   docx (7.8 Kb)  
Continue for 1 more page »