Mercurial > hg > ltpda
diff m-toolbox/test/test_ao_mcmc.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m-toolbox/test/test_ao_mcmc.m Wed Nov 23 19:22:13 2011 +0100 @@ -0,0 +1,28 @@ +%% 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) \ No newline at end of file