CS10-8L: Computer Programming Laboratory
Machine Problem #4
Name: John Gabriel Diuyan Sco
re:
Sectio A2 Dat September
n: e: 15, 2024
OBJECTIVES
● To familiarize the students with the Matlab interface.
● To enable the students to use some basic commands.
MACHINE PROBLEM
You found two things at Mapua! The first item weighs weight1 and is worth value1, and the
second item weighs weight2 and is worth value2. What is the total maximum value of
the items you can take with you, assuming that your max weight capacity is maxW and you
can't come back for the items later?
Test Data:
Test Value1 Weight Value2 Weight MAXWEIG OUTPU
1 2 HT T
1 10 5 6 4 8 10
2 10 5 6 4 9 16
3 10 2 11 3 1 0
4 15 2 20 3 2 15
5 2 5 3 4 5 3
6 4 3 3 4 4 4
7 3 5 3 8 10 3
Prepared by: Bon Ryan Fran
Prepared Date: March
21, 2024
CS10-8L: Computer Programming Laboratory
Machine Problem #4
Prepared by: Bon Ryan Fran
Prepared Date: March
21, 2024
CS10-8L: Computer Programming Laboratory
Machine Problem #4
Prepared by: Bon Ryan Fran
Prepared Date: March
21, 2024
CS10-8L: Computer Programming Laboratory
Machine Problem #4
Prepared by: Bon Ryan Fran
Prepared Date: March
21, 2024