function y = distaddharmonics(v, x)
%y = distaddharmonics(v,x)
%given input signal x will return signal y- both column vectors
%The vector v represents the weights of the harmonics to compose y
%for example, if v = [1, 0, .3, 0, .1] then y will consist of the original
%frequencies from x + (.3 * 3rd harmonic of each frequency in x) + (.1 *
%5th harmonic of each frequency in x)
%this function is meant to be curried with the curry function to use with
%the distort function

y = zeros(length(x), 1);

for i = 1:length(v)
    y(1:i:length(y)) = y(1:i:length(y)) + (v(i) * x(1:ceil(length(y)/i)));
end