You are on page 1of 13

FACULTY OF MECHANICAL ENGINEERING

SEMM 1013: PROGRAMMING FOR ENGINEERS

PROJECT 2

Name Mohamad Basyir Izdiyat bin Mohammad


Wisman

Name of Dr. Khairul Anwar


Lecture
r
Matric A22EM0120
Number
Date 2 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 uses 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

test40 = (((Test1_Q1 +
Test1_Q2)./200).*20)+(((Test2_Q
1 + Test2_Q2 + Test2_Q3 +
Test2_Q4)./100).*20);

assignment30 = (((manual1 +
manual2 + manual3 +
manual4)./40).*20) + (((cad1 +
cad2 + cad3 + cad4)./40).*10);

project30 =
(project_assembly_drawing +
project_part_drawing +
project_modern_tools);

final_marks = test40 +
assignment30 + project30;

overall_average_marks =
(sum(final_marks))/no;
(overall_average_ average_grade = 'A+'
marks >=90)

(overall_average_ average_grade = 'A'


marks >=80)

(overall_average_ average_grade = 'A-’


marks >=75)

(overall_average_ average_grade = 'B+


marks >=70)

(overall_average_ average_grade = 'B'


marks >=65)

(overall_average_
average_grade = 'B-'
marks >=60)
(overall_average average_grade = 'C+'
_marks >=55)

(overall_average average_grade = 'C'


_marks >=50)

(overall_average
average_grade = 'C-'
_marks >=45)

(overall_average
average_grade = 'D+'
_marks >=40)

(overall_average
average_grade = 'D'
_marks >=35)

(overall_average
_marks >=30) average_grade = 'D-'
fprintf RESULTS SUMMARY,
average_grade = 'E Subject Code: SEMM1013,
Semester 1, No of students, The
Overall Average Mark

output Results Table

Sort Table by name

quiz_average
=((((manual1./10)+(manual2./10)+(manua
l3./10)+(manual4./10)+(cad1./10)+(cad2./
10)+(cad3./10)+(cad4./10))./8)*100);

exam_average =
((((Test1_Q1./100)+(Test1_Q2./100)+(Tes
t2_Q1./30)+(Test2_Q2./16)+(Test2_Q3./19
)+(Test2_Q4./35))./6).*100);

Fprinf Name, ID Number, Quiz Average, Sort table by id_number


Exam Average

output output2
output output1

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 Matrik No
3.4 Graph Grades

3.5 codes

Codes above is for read and write the database


Codes above is to declare every 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 student’s marks and grades


Code above is to write database to output1

Codes above is to sort table by name

Codes above is to sort table by ID Number

You might also like