function z = Hermite(x,y,c,t)
%  Computes the Hermite polynomial at the
%  parameter value t, given data point vectors
%  x and y, slope and divided difference 
%  coefficients c.

m = max(size(x));
for k=1:m
  xx(2*k-1) = x(k);
  xx(2*k) = x(k);
end

z = t - t + c(2*m);
for k = 2*m-1:-1:1
   z = z .* ( t - xx(k) ) + c(k);
end