added matlab wrappers