Professional Documents
Culture Documents
Laboratory Activity
Laboratory Activity
IN
NUMERICAL METHODS AND ANALYSIS
GROUP 2:
PABLO, HARRISON P.
CORTEZ, MICHAEL ANGELO
RIVERA, CRIS ERROL
BS CPE 3A
Front page
Table of Contents
I. INTRODUCTION
A. Activity Description
B. Objectives
C. Materials
II. ACTIVITY DETAILS
A. UNCONSTRAINED OPTIMIZATION
1. Analytical method
2. EXCEL
a. Golden-Section Search
b. Parabolic Interpolation
c. Newton’s Method
3. MATLAB
a. fminbnd function
B. CONSTRAINED OPTIMIZATION
1. Analytical Method
2. EXCEL
a. Excel Solver
3. MATLAB
a. fminsearch function
III. Conclusion
I. INTRODUCTION
A. Activity Description
This experiment aims to maximize the value of a function using both constrained and
unconstrained optimization strategies. In certain numerical case studies, Excel Solver is used to generate
the answer. Excel and MATLAB are utilized to execute an iterative procedure involving the Golden-
Section Search, Parabolic Interpolation, and Newton's Method.
B. Objectives
• Carry out the numerical methods of the case study while sticking to the restricted optimization
concept.
• Develop software that can be used for both limited and unconstrained optimization of a function
to discover its maximum.
• Calculating the maximum value of a function of a single variable f using open and bracketing
approaches (x).
C. Materials
Excel
Matlab
UNCONSTRAINED OPTIMIZATION
Program:
Using the fminbnd function to get the maximum
x = linspace(-2,4,101);
g = @(x) -f(x);
plot(x,-g(x))
hold on;
plot(xMax, Ymax, '*');
text(xMax, Ymax, '\leftarrow Maximum');
xlabel('X');
ylabel('f(x)');
title('Maximum value of a function');
Result: Graph:
CONSTRAINED OPTIMIZATION
A computer equipment manufacturer produces scanners and printers. The resources needed for
producing these devices and the corresponding profits are
If there are $127,000 worth of capital and 4270 hr of labor available each day, how many of each
device should be produced per day to maximize profit?
2. Excel Solver
III. Conclusion
In this lab, we will examine a number of unconstrained optimization strategies for addressing
a variety of problems, as well as a number of approaches to the problem at hand. In addition,
we can determine the maximum value of each problem using Excel and Matlab, which assists
us in obtaining the desired solutions.