%% Simple test:

x = 1*ones(1000,1);
y = 3*x;

x = ao(x);
y = ao(y);

x0 = 3.3;
model = smodel(plist('expression','A*x','xvar','x','params','A','xvals',[x.y]));

noise = ao(plist('waveform', 'noise', 'fs', 10, 'nsecs', 100,'sigma',0.1));

pl = plist('N',1000,...
  'J',1,...
  'cov',0.1,... % [4e-5 1e-5 1e-6 1e-8 1e-9]
  'range',{[0.5 5.5]},...
  'param',{'A'},...
  'model',model,...
  'noise',noise,...
  'search',false,...
  'x0',[x0],...
  'simplex',false,...
  'plot',1);

b = mcmc(x,y,pl);

plot(b.chain)