Professional Documents
Culture Documents
Group Members
Leonardo, Cynric D.
Grading Criteria
2 10
3 10
4 10
5 10
6 10
7 10
8 10
9 10
10 10
11 10
12 10
13 10
Total 130
1. Objective:
The activity aims to create matlab program that will ask the user to choose between the two types of
figures in solid mensuration and output the area, perimeter/circumference, volume or surface area of a
certain figure.
2. Intended Learning Outcomes (ILOs):
The students shall be able to:
2.1 create matlab programs that will determine the area and perimeter of five(5) plane figures
2.2 create matlab programs that will determine the volume and surface area of five(5) solid figures
2.3 use switch…case… break in creating matlab program for a simple solid mensuration problem-
solving situation.
3. Discussion :
Solid Mensuration is a branch of mathematics that deals with the area and perimeter/circumference of
plane figures and volume and surface area of solid figures.
4. Resources:
Matlab
5. Procedure:
1. Using the matlab editor, choose File/New/ Blank m-file , type the following:
clc;
disp('Area of the Rectangle');
length=input('Enter the length of the rectangle: ');
width=input('Enter the width of the rectangle :');
area=length*width;
fprintf('The area of the rectangle is %0.2f. ',area );
2. Save the file as areaRectangle. Run the program and record the results.
3. Create m-file for the area of the square, right triangle, oblique triangle, circle and ellipse.
4. Create m-file for the perimeter of square, rectangle, right triangle, oblique triangle, circle and
ellipse. For circle, use circumference instead of perimeter.
5. Create m-file for the volume of cone, sphere, rectangular parallelepiped, right circular cylinder and
cube.
6. Create m-file for the surface area of cone, sphere, rectangular parallelepiped, right circular cylinder
and cube.
7. Using the matlab editor, choose File/New/Blank m-file, type the following:
clc;
disp('Area and Perimeter of the Rectangle');
choose=input('\n 1. Area of the Rectangle \n 2. Perimeter of the Rectangle \n Choose 1 or 2: ');
switch(choose)
case 1;
length=input('Enter the length of the rectangle: ');
width=input('Enter the width of the rectangle :');
area=length*width;
fprintf('The area of the rectangle is %0.2f. ',area );
break;
case 2;
length=input('Enter the length of the rectangle: ');
width=input('Enter the width of the rectangle :');
perimeter= 2*length + 2*width;
fprintf('The perimeter of the rectangle is %0.2f. ',perimeter );
break;
end
8. Create a matlab program that will ask the user to choose between plane figures and solid figures.
If the user will choose plane figures, he will then be ask to choose among the five (5) plane figures
as mentioned in Procedure No. 4. After choosing any of the five (5) plane figures, he will then be
ask to choose between area and perimeter. If the user will choose solid figures, he will then be ask
to choose among the five (5) solid figures as mentioned in Procedure No. 5. After choosing any of
the five (5) solid figures, he will then be ask to choose between volume and surface area.
Necessary inputs are needed and the output will be any of the area or perimeter of any of the five
(5) plane figures and any of the volume and surface area of any of the five (5) solid figures.
45
perimeter=a+b+c; 7
Circumference=2*3.1416*radius;
The Circumference of the circle is
fprintf('The Circumference of the Circle is %0.2f. 490.09. >>
',circumference);
clc; Perimeter of the ellipse
disp('Perimeter of the ellipse'); Enter the distance from center to
a=input('Enter the distance from center to vertex of vertex of the Ellipse: 15
the Ellipse: '); Enter the distance from center to
b=input('Enter the distance from center to co-vertex co-vertex of the Ellipse: 12
of the Ellipse: '); The Perimeter of the Ellipse is
perimeter =(2*3.1416) *(sqrt((a^2+b^2)/2)); 85.35. >>
fprintf('The Perimeter of the Ellipse is %0.2f.
',perimeter );
end
case 2
choose=input('\n 1. Surface Area \n 2.
Voume \n Choose 1 or 2: ');
switch(choose)
case 1
disp('Surface Area of the Sphere');
r=input ('Enter the Radius of the
Sphere: ');
area=4*pi*r^2;
fprintf('The Surface Area of the
Sphere is %0.2f. ', area);
case 2
disp('Volume of the Sphere');
r=input ('Enter the Radius of the
Sphere: ');
vol=(4/3)*pi*r^3;
fprintf('The Volume of the Sphere is
%0.2f. ', vol);
end
case 3
choose=input('n\ 1. Surface Area \n 2.
Volume \n Choose 1 or 2:');
switch(choose)
case 1
disp('Surface Area of the Rectangular
Parallelepiped');
l=input('Enter the length of the
Rectangular Parallelepiped:');
w=input('Enter the width of the
Rectangular Parallelepiped:');
h=input('Enter the height of the
Rectangular Parallelepiped:');
a=2*((w*l)+(h*l)+(h*w));
fprintf('The surface area of the
Rectangular Parallelepiped is %0.2f.',a);
case 2
disp('Volume of the Rectangular
Parallelepiped');
l=input('Enter the length of the
Rectangular Parallelepiped:');
w=input('Enter the width of the
Rectangular Parallelepiped:');
h=input('Enter the height of the
Rectangular Parallelepiped:');
a=l*w*h;
fprintf('The volume of the Rectangular
Parallelepiped is %0.2f.',a);
end
case 4
choose=input('n\ 1. Surface Area \n 2.
Volume \n Choose 1 or 2:');
switch(choose)
case 1
disp('Surface Area of the Cylinder');
r=input('Enter the radius of the
cylinder: ');
h=input('Enter the height of the
cylinder: ');
area=(2*pi*r*h)+(2*pi*r^2);
fprintf('The Surface Area of the cone
is %0.2f. ', area);
case 2
disp('Volume of the Cylinder');
r=input('Enter the radius of the
cylinder: ');
h=input('Enter the height of the
cylinder: ');
area=(h*pi*r^2);
fprintf('The Volume of the Cyinder is
%0.2f. ', area);
end
case 5
choose=input('n\ 1. Surface Area \n 2.
Volume \n Choose 1 or 2:');
switch(choose)
case 1
disp('Surface Area of the Cube');
s=input ('Enter the Side of the Cube:
');
area=6*s^2;
fprintf('The Surface Area of the Cube
is %0.2f. ', area);
case 2
disp('Volume of the Cube');
s=input ('Enter the Side of the Cube:
');
area=s^3;
fprintf('The Volume of the Cube is
%0.2f. ', area)
end
end
case 2
choose=input('\n 1. Square \n 2. Rectangle \n
3. Right Triangle \n 4. Circle \n 5. Ellipse \n Choose
1 to 5: ');
switch (choose)
case 1
choose=input('\n 1. Area \n 2. Perimeter \n
Choose 1 or 2: ');
switch(choose)
case 1
disp('Area of the Square');
s=input('Enter the side of the square:
');
a=s^2;
fprintf('The Area f the Square is
%0.2f. ', a);
case 2
disp('Perimeter of the Square');
s=input('Enter the side of the square:
');
p=4*s;
fprintf('The Perimeter of the Square
is %0.2f. ', p);
end
case 2
choose=input('\n 1. Area \n 2. Perimeter \n
Choose 1 or 2: ');
switch(choose)
case 1
disp('Area of the Rectangle');
l=input('Enter the Length of the
Rectangle: ');
w=input('Enter the Width of the
Rectangle: ');
a=l*w;
fprintf('The Area of the Rectangle is
%0.2f. ', a);
case 2
disp('Perimeter of the Rectangle');
l=input('Enter the Length of the
Rectangle: ');
w=input('Enter the Width of the
Rectangle: ');
p=2*(l*w);
fprintf('The Perimeter of the
Rectangle is %0.2f. ', p);
end
case 3
choose=input('\n 1. Area \n 2. Perimeter \n
Choose 1 or 2: ');
switch(choose)
case 1
disp('Area of the Right Triangle');
b=input('Enter the base of the right
triangle: ');
h=input('Enter the height of the right
triangle: ');
a=(b*h)/2;
fprint('The Area of the Right Triangle
is %0.2f. ', a);
case 2
disp('Perimeter of the Right
Triangle');
b=input('Enter the base of the right
triangle: ');
h=input('Enter the height of the right
triangle: ');
p=h+b+sqrt(h^2+b^2);
fprint('The Perimeter of the Right
Triangle is %0.2f. ', a);
end
case 4
choose=input('\n 1. Area \n 2.
Circumference \n Choose 1 or 2: ');
switch(choose)
case 1
disp=('Area of the Circle');
r=input('Enter the Radius of the
Circle: ');
a=pi*r^2;
fprintf('The Area of the Circle is
%0.2f. ', a);
case 2
disp=('Circumference of the Circle');
r=input('Enter the Radius of the
Circle: ');
c=2*pi*r;
fprintf('The Circumference of the
Circle is %0.2f. ', c);
end
case 5
choose=input('\n 1. Area \n 2. Perimeter \n
Choose 1 or 2: ');
switch(choose)
case 1
disp('Area of the Ellipse');
a=input('Enter the a axis of the
ellipse: ');
b=input('Enter the b axis of the
ellipse: ');
a=pi*a*b;
fprintf('The Area of the Ellipse is
%0.2f. ', a);
case 2
disp('Perimeter of the Ellipse');
a=input('Enter the a axis of the
ellipse: ');
b=input('Enter the b axis of the
ellipse: ');
p=2*pi*sqrt((a^2+b^2)/2);
fprintf('The Area of the Ellipse is
%0.2f. ', p);
end
end
end
7. Conclusion:
I therefore conclude that in using MATLAB, I was able to create a program that will users an
instant answer in figuring the size, area, volume or perimeter of a certain solid. Geometry is a key attribute
of solids and of the bodies they comprise. It features in the solid visualizations provided by Solid blocks as
visual aides during modeling. It features also in the multibody visualizations displayed in Mechanics
Explorer following model assembly and during simulation. This is one purpose of solid geometry: to enable
visualization for an entire modeling workflow, from the conception of a single solid to the simulation of a
complete multibody model.
8. Assessment (Rubric for Laboratory Performance):
TECHNOLOGICAL INSTITUTE OF THE PHILIPPINES
RUBRIC FOR MODERN TOOL USAGE
(Engineering Programs)
Student Outcome (e): Use the techniques, skills, and modern engineering tools necessary for engineering
practice in complex engineering activities.
Program: Chemical Engineering Course: CHE 205 Section: CHE 22S1 1 st Sem SY:2020-2021
Performance Unsatisfactory Developing Satisfactory Very Satisfactory Score
Indicators 1 2 3 4
1. Apply Fails to identify Identifies Identifies modern Recognizes the
appropriate any modern modern techniques and is benefits and
techniques, techniques to techniques but able to apply constraints of
skills, and perform fails to apply these in modern
modern discipline- these in performing engineering tools
tools to specific performing discipline-specific and shows
perform a engineering discipline- engineering task. intention to apply
discipline- task. specific them for
specific engineering engineering
engineering task. practice.
task.
2. Demonstrate Fails to apply Attempts to Shows ability to Shows ability to
skills in any modern apply modern apply fundamental apply the most
applying tools to solve tools but has procedures in appropriate and
different engineering difficulties to using modern effective modern
techniques problems. solve tools when solving tools to solve
and modern engineering engineering engineering
tools to problems. problems. problems.
solve
engineering
problems.
3. Recognize Does not Recognizes Recognizes the Recognizes the
the benefits recognize the some benefits benefits and need for benefits
and benefits and and constraints of and constraints of
constraints constraints of constraints of modern modern
of modern modern modern engineering tools engineering tools
engineering engineering engineering and shows and makes good
tools. tools. tools. intention to apply use of them for
them for engineering
engineering practice.
practice.
Total Score
Mean Score = (Total Score / 3)
Percentage Rating = (Total Score / 12) x 100%
Evaluated by: Engr. Crispulo G. Maranan October 15, 2020
Printed Name and Signature of Faculty Member Date