convert dataset to mtx