function fake = makefake(center, width, height,NN, noisesd)
  % makefake(center, width, height,NN, noisefd)
%
  locs = [1 round((center-(width/2))) center round((center+(width/2))) NN];
NN = locs(length(locs));
vals = [0 0 height 0 0];
orig = zeros(NN,1);
for n=1:(length(locs)-1)
  inc = (vals(n+1)-vals(n))/(locs(n+1)-locs(n));
  for m=locs(n):(locs(n+1))
    orig(m) = vals(n) + (m-locs(n))*inc;
  endfor
endfor
NWIN=10;
win = hamming(NWIN);
win = win/sum(win);
orig1 = conv(orig,win);
fake = orig1((NWIN/2):(NN+NWIN-(NWIN/2)-1)) + randn(NN,1)*noisesd;
