Matlab Version of OTIS