function h=hermite(varargin)
for i=1:length(varargin)
    x(i)=varargin{i}(1);
y(i)=varargin{i}(2);
end


n=0;
index=[];
xrep=[];
yrep=[];

for i=1:length(varargin)
    ni=length(varargin{i})-1;
    n=n+ni;
    index=[index i*ones(1,ni)];
    xrep=[xrep x(i)*ones(1,ni)];
    yrep=[yrep y(i)*ones(1,ni)];
end
n=n-1;
[index' xrep' yrep'];

pr=yrep;
pr1=zeros(1,n+1);
pr1(1)=yrep(1);

for j=1:n
    for i=1:n+1-j
        if index(i)==index(i+j)
            pr(i)=varargin{index(i)}(j+2)/factorial(j);
        else
        pr(i)=(pr(i+1)-pr(i))/(xrep(i+j)-xrep(i));
        end
    end
    pr1(j+1)=pr(1);
end


h=pr1(end);

for i=n:-1:1
    h=conv(h,[1,-xrep(i)]);
    h(end)=h(end)+pr1(i);
end


















