ChBE 2120 Homework 6, Spring 2011
Due: Friday, March 4, at 8:05 AM
Note: we will begin covering optimization in class on Tuesday.
What we cover on Tuesday will be
sufficient to do this entire assignment.
Before then, you should still be able to do 1a, 1b, 1e, 2a, and 2b
based on things that have already been covered in class.
(Hint for 1e if you decide to do it before
Tuesday: see the optional homework from HW4 and/or the discussion of that optional homework in the
forums.)
݂ሺݔሻ ൌ ሺsin ݔሻሺlog ݔሻ 2݁
ି௫
cos ݔ
1)
For the following function:
a)
Write a Matlab function that represents the function above.
Name your function
hw6funcF_myGtAccountId.m
.
The function declaration may look like:
function
f = hw6funcF_mstyczynski6(x)
b)
Plot the function for 2.5
≤
x
≤
7.
(You can do this in a separate script, or in the script from part
D below.)
Save the figure as a png file,
hw6part1plot_myGtAccountId.png
c)
Write a function that uses the golden section search to find the value of x that
maximizes
an
arbitrary function.
(This is the method we have gone over in class.)
Name your function
goldenSectionMax_myGtAccountId.m
.
This function should take as input a function
This
preview
has intentionally blurred sections.
Sign up to view the full version.

This is the end of the preview.
Sign up
to
access the rest of the document.
- Spring '07
- Gallivan
- Grid Computing, English-language films, Golden ratio, Golden section search, Matlab function
-
Click to edit the document details