• R/O
  • SSH
  • HTTPS

particle-filter: 提交


Commit MetaInfo

修订版23 (tree)
时间2010-05-27 21:19:07
作者(del#42041)

Log Message

(empty log message)

更改概述

差异

--- sample/step.cc (revision 22)
+++ sample/step.cc (revision 23)
@@ -35,7 +35,7 @@
3535 MTRand mtrand;
3636 mtrand.seed(time(NULL));
3737 track.setNumber(5);
38- track.setDimension(3);
38+ track.setDimension(1);
3939 track.set_state_func(&func1);
4040 track.set_robserve_func(&func2);
4141 track.set_robserve_jacobian_func(&func3);
@@ -42,11 +42,13 @@
4242 track.set_robserve_density_func(func4);
4343 track.createInitialParticles();
4444 double t,y;
45+ Particles<double> y(5,1);
4546 for(int i=0;i<100;++i)
4647 {
48+ track.get_next_state() // predict
4749 t = i<25?1:i<50?0:i<75?-1:1;
48- y = t + mtrand.rand();
49-cout<<y<<endl;
50+ y[0] = t + mtrand.rand();
51+cout<<y[0]<<endl;
5052
5153 }
5254 }
\ No newline at end of file
Show on old repository browser