### Jeff Dunn - Lab 8

```
clf reset;
hold on, axis equal

% values for the 'J'

x = [ 2.0 1.5 1.05 1.8 2.5 2.8 2.6 2.0 1.4 1.0 0.8 1.3  2.2];

y = [ 2.0  2.2 3.2 4.75 5.25 5.0 4.0 2.2 0.9 0.3 0.7 1.7 2.5];

t = 1:length(x);
ti = 1 : .1 : length(t);

% use MATLAB's spline function to interpolate at ten (well OK actually
% nine) additional points on each interval

xi = spline(t,x,ti);
yi = spline(t,y,ti);

%plot(x,y,'x');
plot(xi,yi);

% values for the 'e' and the first 'f'

x = [ 2.2 3.0 3.4 3.0 2.4 2.41 2.52 2.8 3.2 3.4 3.6 ...
4.3 4.9 4.7 4.1 3.6 3.2 3.6 4.0 3.6 ];

y = [ 2.5 2.75 3.1 3.3 2.55 2.2 2.08 2.0 2.1 2.2 2.3 ...
3.0 4.4 5.0 4.0 2.3 1.0 .4 1.0 2.3 ];

t = 1:length(x);
ti = 1 : .1 : length(t);

xi = spline(t,x,ti);
yi = spline(t,y,ti);

%plot(x,y,'x');
plot(xi,yi);

% values for the other 'f'

x = [ 3.6 5.0 6.1 5.9 5.3 5.0 4.6 4.9 5.3 4.9 ];

y = [ 2.3 2.7 4.0 4.8 4.0 2.7 1.0 .4 1.0 2.4 ];

t = 1:length(x);
ti = 1 : .1 : length(t);

xi = spline(t,x,ti);
yi = spline(t,y,ti);

%plot(x,y,'x');
plot(xi,yi);
```