adding matlab code from the tarball

resolves issue #2