All pastes #812423 Raw Edit

problem 3

public text v1 · immutable
·published 2007-12-11 19:35 UTC
rendered paste body
%*********************************************************************
%Csci 2031
%Assignment 6
%Problem 3
%Use Matlab spline function to model an uppercase cursive E
%*********************************************************************
function[]=problem3
%points
t=[0 1 2 3 4  5 6 7];
x=[150 100 0 0 100 0 0 100];
y=[-50 -75 -50 75 75 100 200 200];

px= spline(t,x);
py= spline(t,y);

T = linspace(0, 7, 100);

plot(x,y,'o'); hold on
plot( ppval(px, T), ppval(py, T), 'd');
axis(gca, 'equal');

end