Updated Matlab example