function [t,xx]=sumcos(f,X,fs,dur); t=[0:1/fs:dur];xx=real(X*exp(j*2*pi*f'*t));