add Matlab implementation