clear all
rng(1122334457);
%Replace the above line with the one below for Octave
%randn("seed",1122334457);
c=[1 0 1 1 0 2]';
x=[0:0.1:4*pi];
eta=0.0*randn(size(x));
y=model(c,x)+eta;
plot(x,y,".");
cn=[0.9 0 0.9 0.9 0 2.1]';
yn=model(cn,x);
hold on
plot(x,yn);
hold off
A=makeA(cn,x);
B=makeB(cn,x,y);
xi=A\B;
cm=cn+xi;
hold on
plot(x,model(cm,x));
hold off
