Changeset 679 for library/tests/tutorial
- Timestamp:
- 10/23/09 00:05:25 (15 years ago)
- Location:
- library/tests/tutorial
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
library/tests/tutorial/arx_simple.cpp
r477 r679 9 9 ARX Ar; 10 10 Ar.set_statistics ( 1, V0 ); //nu is default (set to have finite moments) 11 Ar.set_constant(true); 12 Ar.validate(); 11 13 // forgetting is default: 1.0 12 14 mat Data = concat_vertical ( randn ( 1, 100 ), ones ( 1, 100 ) ); -
library/tests/tutorial/kalman_simple.cpp
r477 r679 20 20 KF.set_parameters ( A, B, C, D,/*covariances*/ Q, R ); 21 21 KF.set_statistics ( mu0, P0 ); 22 KF.validate(); 22 23 // Estimation loop 23 24 for ( int i = 0; i < 100; i++ ) { 24 KF.bayes ( randn ( d x +du ) );25 KF.bayes ( randn ( dy), randn( du ) ); 25 26 } 26 27 //print results