Matlabfunctions to make your life easier