You are on page 1of 13

FACULTY OF MECHANICAL ENGINEERING

SEMM 1013: PROGRAMMING FOR ENGINEERS

PROJECT 2

Name of Lecturer Dr. Khairul Anwar

Student Name Muhammad Danish Hadi Bin


Arzanizam

Matric Number A22EM0503


Date 28 FEBRUARI 2022
1.0 INTRODUCTION
MATLAB is a programming platform designed specifically for engineers and scientists to
analyse and design systems and products that transform our world. The heart of MATLAB is
the MATLAB language, a matrix-based language allowing the most natural expression of
computational mathematics.

1.1 OBJECTIVES

The objective the report is to use the knowledge of MATLAB program for engineers to make
a function regarding students’ semester final grades.

-This report also use the knowledge of MATLAB data structures and file input/output to read
and write data from and to text files.
2.0 FLOW CHART
START

Read in a database from file

Tests =
(((Test1_Q1+Test1_Q2)./200).*20)
+(((Test2_Q1+Test2_Q2+Test2_Q3
+Test2_Q4)./100).*20);

Assignments =
(((Manual_1+Manual_2+Manual_
3+Manual_4)./40).*20)+(((CAD_1+
CAD_2+CAD_3+CAD_4)./40).*10);

Project =
(Project_Assembly_Drawing+Proje
ct_Part_Drawing+Project_Modern
_Tools);

Final_Marks =
Tests+Assignments+Project;

Overall_Average_Marks=sum of
Final_marks/number of students
If Final_Marks and Avg_grade and Final_marks = ‘A+’
Overall_Average_Marks
>=90

If Final_Marks and
Avg_grade and Final_marks = ‘A’
Overall_Average_Marks
>=80

If Final_Marks and Avg_grade and Final_marks = ‘A-’


Overall_Average_Marks
>=75

If Final_Marks and
Avg_grade and Final_marks = ‘B+’
Overall_Average_Marks
>=70

If Final_Marks and
Avg_grade and Final_marks = ‘B’
Overall_Average_Marks
>=65

If Final_Marks and
Overall_Average_Marks Avg_grade and Final_marks = ‘B-’
>=60
If Final_Marks and
Avg_grade and Final_marks = ‘C+’
Overall_Average_Marks
>=55

If Final_Marks and Avg_grade and Final_marks = ‘C’


Overall_Average_Marks
>=50

If Final_Marks and
Overall_Average_Marks Avg_grade and Final_marks = ‘C-’
>=45

If Final_Marks and
Overall_Average_Marks Avg_grade and Final_marks = ‘D+’
>=40

If Final_Marks and
Overall_Average_Marks Avg_grade and Final_marks = ‘D’
>=35

If Final_Marks and
Overall_Average_Marks Avg_grade and Final_marks = ‘D-’
>=30
fprintf Results Summary, Subject
Avg_grade and Final_marks = ‘E’ Code: SEMM1013, Number of
students, The overall average
mark

output Results Table

Sort Table by name

Quiz_Average=((((Manual_1./10)+(Manua
l_2./10)+(Manual_3./10)+(Manual_4./10)
+(CAD_1./10)+(CAD_2./10)+(CAD_3./10)+
(CAD_4./10))./8)*100);

Exam_Average =
((((Test1_Q1./100)+(Test1_Q2./100)+(Test
2_Q1./30)+(Test2_Q2./16)+(Test2_Q3./19)
+(Test2_Q4./35))./6).*100);

Fprinf Name, Matrik no, Quiz average, Sort table by id_number


exam average

output Output_2
output Output_1

Output Grades graph

END
3.0 RESULT AND DISCUSSION
First , to execute the output , we need to type the command below

3.1 Overall results


3.2 Output 1
Sort by name

3.3 Output 2
Sort by matriks number
3.4 Graph Grades

3.5 codes

Codes above is for read and write the database


Codes above is to declare each column.

Codes above are formula to calculate the percentage of tests, assignments, projects and
final marks.
Codes above is to calculate Overall average marks and to determine grades for overall
students’ marks

Codes above is to display:


Codes above is to calculate each students’ Final marks

Codes above is to make a table for students marks and grades


Code above is to write database to output_1

Codes above is to sort table by name

Codes above is to sort table by id number

You might also like