Matlab codes for my master's research project