Added quit and setPosition for matlab