# 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.0960Again, 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.

The "final exam" for this course will take place
at 8:00 AM on Tuesday, 12 December. This will be an ordinary
50 minute test. It will be comprehensive, but weighted toward
the latter half of the semester. As always, paper notes will
be permitted, but no electronic devices will be allowed.

A
Solution example is available
for the quiz.

Assignment A is posted.