Use example of CameraControl_MatlabToolbox. This program allow to take timelapses