Matlab functions

Adding matlab functions that we might use