Run this script and follow the steps to create your video time lapse from your images. Images can be a wide range of format but must be all the same size, or you will get an error. The video format is JPEG AVI, you can set frame rate, quality and scale factor without change the code.
Quick FYI, I started using your script and couldn't figure out why it wasn't working. Turns out, many autosaved image files have the extension in CAPS (i.e. example.JPG). I fixed it in my copy, but may want to fix it in the master as well.
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.