%This m-file will interpolate two sets of data and plot them on the same
%graph

%First data set
time1 = [0.0 	0.5 	1.0 	1.5 	2.0];
conc1 = [0.0 	0.19 	0.26	0.29 	0.31];

%Second data set
time2 = [0.00 	0.10 	0.40 	0.50	0.60	0.90	1.00	1.10	1.40	1.50	1.60	1.90	2.00]; 	
conc2 = [0.0 	0.06	0.17	0.19	0.21	0.25	0.26	0.27	0.29	0.29	0.30	0.31	0.31];

%interpolation domain
t=(0:.001:2.0);
u=splinetx(time1,conc1,t);
v=splinetx(time2,conc2,t);

plot(time1,conc1,'o',time2,conc2,'*',t,u,'g-',t,v,'-r');
xlabel('time');
ylabel('Concentration of product'); 
title('Comparison of interpolation with different data sets');
legend('data1','data2','interp 1','interp 2',4);