# NAME

sample_from_LDS_2 - 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_2
(
Vector_vector **x,
Vector_vector **y,
int N,
const Matrix_vector *A,
const Matrix_vector *Q,
const Matrix_vector *H,
const Matrix_vector *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_k * x_{k-1} + w
y_k = H_k * z_k + v
where w ~ N(0, Q_k) and v ~ N(0, R_k) and u ~ N(0, S_0), and the A_k
and Q_k are nxn matrices, the H_k is an mxn matrix and R_k 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
,
compute_kalman_filter
,
compute_kalman_filter_stable
,
compute_kalman_filter_2
,
compute_kalman_filter_2_stable