Uploaded HMP functions in C and Matlab