Create retr_database_dir.m

directly copyed from JianChao Yang