function retval = expeval(c,m,x)
% usage: y = expeval(c,m,x)
% description: given vectors of complex trig
% coefficients c of length n,  and argument vector x
% this function returns the value of the complex trig series
% p(x) = sum(c(k)*exp(i*(m + k)*x),k=0..n-1)       

% programmer: t. shores
% last rev.: 2/6/16

% Octave and Matlab compatible file
n = length(c);
retval = zeros(size(x));
for k = 0:n-1
  retval = retval + c(k + 1)*exp(i*(m + k)*x);
end
