Matlab source code for predictability and state estimation.