function [x,f] = sweep (f0,fs,dN,ndec)
% sweep through frequency

n = (0:dN*ndec);
f = f0/fs * 10.^(n/dN);
x = sin(2*pi*f.*n);
