function plotfit(parms)
% plotfit - plot fit against data

amp = parms(1);
freq = parms(2);
phi = parms(3);
DC = parms(4);

global datain
t = datain(:,1);
y = datain(:,2);

y1 = amp * sin(freq*t + phi)+DC;

plot(t,y,'bx',t,y1,'r-')
