Jeff Falin - Lab 8

clf reset;
hold on,axis equal 

% values for the first part of 'J' 

x = [10 8 5.7 5 5.7 8 9.7] ;

y = [0 1 3 5 7.5 9 7]; 

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 first part of 'J' 

x = [9.7 10] ;

y = [7 0]; 

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 first part of 'J' 

x = [10 9.7] ;

y = [0 -7]; 

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 first part of 'J' 

x = [9.7 8.5 7.5 8.3 10] ;

y = [-7 -9 -7 -3 0]; 

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 first part of 'J' 

x = [10 12.5 13.5 12.5 11.5 12.5 14 16 16.7 17 16.5 16.1];

y = [0 1 2.5 3.7 2.5 1 0.3 1 4 7 8 7.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 first part of 'J' 

x = [16.1 16 16.1 16.9 17.3 16] ;

y = [7.5 0 -6 -6.7 -4.1 0]; 

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 first part of 'J' 

x = [16 18.6 19.7 20 19.5 19.1]  ;

y = [0 0.8 4 7 8 7.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 first part of 'J' 

x = [19.1 19 19.1 19.9  20.3 19] ;

y = [7.5 0 -6 -6.7 -4.1 0]; 

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 first part of 'J' 

x = [19 20.6 22] ;

y = [0 .2 1]; 

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);