NAME

sample_from_LDS - Creates a LDS sample

SYNOPSIS

#include "sequential/sequential_lds.h"

Example compile flags (system dependent):
  -DLINUX_X86_64 -DLINUX_X86_64_OPTERON  -DGNU_COMPILER 
   -I/home/kobus/include
   -L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
  -lKJB                               -lfftw3  -lgsl -lgslcblas -ljpeg  -lSVM -lstdc++                    -lpthread -lSLATEC -lg2c    -lacml -lacml_mv -lblas -lg2c      -lncursesw 


int sample_from_LDS
(
	Vector_vector **x,
	Vector_vector **y,
	int N,
	const Matrix *A,
	const Matrix *Q,
	const Matrix *H,
	const Matrix *R,
	const Vector *mu_0,
	const Matrix *S_0
);

DESCRIPTION

This routine generates N samples from an LDS with the given parameters. In other words, it creates vectors x_k and y_k, k=1,...,N, such that: x_1 = mu_0 + u, x_k = A * x_{k-1} + w y_k = H * z_k + v where w ~ N(0, Q) and v ~ N(0, R) and u ~ N(0, S_0), and the A and Q are nxn matrices, the H is an mxn matrix and R is an mxm matrix, with n being the dimension of the state variable. As usual, *x and *y are reused if possible and created if needed, according to the KJB allocation semantics.

RETURNS

NO_ERROR on success, and ERROR on failure, with an appropriate error message being set.

DISCLAIMER

This software is not adequatedly tested. It is recomended that results are checked independantly where appropriate.

AUTHOR

Ernesto Brau

DOCUMENTER

Ernesto Brau

SEE ALSO

sample_from_LDS_2 , compute_kalman_filter , compute_kalman_filter_stable , compute_kalman_filter_2 , compute_kalman_filter_2_stable