% Mika Juntunen / 12.2.2007
%
% This function computes point values 
% to given series solution
%

function y = ratkaisu(x,t,Ck,Dk,fx,ft_c,ft_d)

N = length(Ck);
if ( N ~= length(Dk) )
  error('Ck and Df of different size')
end

y = zeros(length(x),1);
for i = 1:N  
  y = y + fx(x,i)*(Ck(i)*ft_c(t,i)+Dk(i)*ft_d(t,i));
end
