% Test rat_interpolation.m, interpolation using
% rational functions.
% rat_interpolationt.m
% K. Ming Leung, 03/08/03

clear all; hold off;
x=[-1 -0.5 0 0.5 1],
y=[0.0385 0.1379 1.0000 0.1379 0.0385];
xx=-0.99:0.01:0.99;

% ti=[0; 0.2; 0.8; 1.0; 1.2; 1.9; 2.0; 2.1; 2.95; 3.0];
% yi=[0.01; 0.22; 0.76; 1.03; 1.18; 1.94; 2.01; 2.08; 2.9; 2.95];
% xx=0:0.01:3;
% yy=rat_interpolation1(ti,yi,xx);

yy=rat_interpolation1(x,y,xx);
plot(xx,1./(1+25*xx.*xx),'ro',xx,yy,'b-');
%plot(xx,yy); hold on; plot(ti,yi,'r.');
title('Rational Function Interpolation');
