1 - Copy calculation_of_mask_matrix\code folder to the Matlab root path (Ex:My Documents/MATLAB/calculation_of_mask_matrix\code)
2 - Make sure that data files are located in calculation_of_mask_matrix/data folder
3 - Set calculation_of_mask_matrix folder to Matlab path 
4 - Run functional_connectivity_analysis_revised.m
5 - Browse calculation_of_mask_matrix\output directory for the results.

ps.  Data folder is not provided since the owner prohibited sharing them.