my disorganized matlab code