Data generation - datagen.m



This function generates data that have been used for illustration. The latent variables are depicted in Figure 1.

By default there is a change in the relationship between the latent variables at the quarter and a change in the mean at the half.

Note: if you want to use more than 4 latent variables, you will have to expand the variable called swt, which contains the sample time interval of the latent variables (i.e. the difference between two changes).


N=2000; % Number of samples nl=2; % Number of latent variables nx=6; % Number of observable variables