some simulation of  matlab