%
% Determining a Dynamic Matrix for DMC
%
function a = dynmat( su, sd, delu, np, delt )
%
tt = delt * (1:np)';
suu = spline( su(:,1), su(:,2), tt );
sdd = spline( sd(:,1), sd(:,2), tt );
aa = ( suu - sdd ) ./ 2 ./ delu;
%
a = [];
for i = 1:np,
  a = [ a; [ aa(i:-1:1)' zeros(1,np-i) ] ];
end;
return;
%
