## MA/CS 371 - Lab 8 (Two Weeks) Signatures via Natural Cubic Splines

### Section 1: Introduction

In this lab you will use natural cubic splines to fit a particular curve -- your signature.

If you have not already done so, create a directory for this lab and copy the lab 8 files into it. If you start off in your home directory you can do the following:

```	mkdir ~/cs371/lab8
cd ~/cs371/lab8
cp ~cs371/lab8/* .
```
and (as always) don't forget to type that last period.

This is another two-week lab. It will be due on Thursday, April 4th.

As before, it is OK for you to discuss this lab in small groups, as long as you let me know who you were working with.

### Section 2: Topics for Lecture

In lecture I will introduce MATLAB's spline function and will review "parametric functions". If you miss the lecture at the beginning of the lab, you will need to look at HELP SPLINE and figure out for yourself how to fit a curve in two dimensions that loops back over itself.

### Section 3: Using Natural Cubic Splines to Approximate a Curve

Using graph paper, sign your first name, or last name, or a nickname that you won't mind me seeing and grading. There must be at least three letters and you should keep it below eight letters. Make sure to sign the paper large enough that you will be able to mark and plot a few dozen points along your signature. I've discovered that you need to be able to plot these points to about two digits of precision in order for the spline interpolation to be reasonable.

Using as few splines and knots as necessary, interpolate your signature. I am giving you the file jmh.m which shows how I started off doing my own signature.

Notice that you'll need to use a new spline whenever your signature makes a very sharp break -- for example I started a new spline at the bottom of each part of the 'M'. One other thing that is kind of hidden in the code is that I'm using the spline to interpolate at ten points between each knot. You should use at least ten points on each subinterval as well.

Write a MATLAB script M-file, similar to jmh.m, but yours should be called signature.m. I'd like you to plot the knots with the 'x' symbol and the interpolated spline with a line, as in jmh.m.

### Section 4: Turning In Your Work

When your signature.m file is ready, run
```	~cs371/submit lab8
```
These programs will be due by 11:59pm on Thursday, April 4. Please budget your time appropriately, especially if you don't feel like you got halfway there by the end of lab on the 29th.

This lab's questions (due April 4th).