To run the  code:

1) Put all the files in one folder.
2) Set Matlab workspace to be the folder You created.
3) Compile .cpp files by writing: mex fast_comp_bound.cpp in the Matlab command window
4) Run script_Latent by writing: script_Latent in the Matlab command window.
