# Assignment 8

This assignment is much easier than it looks at first glance. In this assignment, you will write a script that evaluates three Matlab functions. The first will take a single argument $$x$$, which might be a vector, and will return the evaluation of a function with the action $\text{gauss}(x)=e^{-\pi x^2}.$ The second function again takes a single argument $$x$$, and use Horner form to evaluate the polynomial $\text{hornerquartic}(x)= \frac14x^4-\frac12x^3+x^2-x+1.$ Again, $$x$$ might be a vector.

The third function will evaluate your name function as discussed in Assignment 7. For example, the instructor would make a function that evaluates $\text{cooper}(x)= \cos(0.75\pi x)+ \frac12\cos(3.75\pi x)+ \frac14\cos(3.75\pi x)+ \frac18\cos(4\pi x)+ \frac1{16}\cos(1.25\pi x)+ \frac1{32}\cos(4.5\pi x)$ We stress that your function will not be the same as this; it will evaluate the function associated with YOUR surname. As usual, $$x$$ might be a vector.

We stress that these functions must handle vectors. When you are finished, you should be able to type Matlab commands with results as follows.

  >> gauss([-1,0,1])

ans =

0.0432    1.0000    0.0432

>> hornerquartic([-1 0 1])

ans =

3.7500    1.0000    0.7500

>> cooper([-1,0,1])

ans =

-0.0960    1.9688   -0.0960

Again, your input and results for the last will be different, because the function depends on YOUR name. And again, to emphasize, you will look up the Horner form of a polynomial and your script will evaluate $$\text{hornerquartic}$$ in that form.

The assignment is turned in when the instructor receives that .m file as an attachment to an email. The assignment is worth 25 points, and is due at 9AM on Tuesday, 31 October.

Assignment 6 is posted.

The midterm exam will take place on Friday, 12 October. As always, you are permitted any paper notes you find useful, but no electronic devices are allowed. The test is cumulative, but emphasizes the material covered in the last fours weeks. A sample exam is available.

You need to install Matlab on your computer by Wednesday. You do not need Simulink or any particular toolboxes, though you might find the Symbolic toolbox useful at some time in the future (not in this class).

Department of Mathematics, PO Box 643113, Neill Hall 103, Washington State University, Pullman WA 99164-3113, 509-335-3926, Contact Us