MATLAB: How to write images to video

imageImage Processing Toolboxvideo processing

I have images in a directory. All the images in this directory have random name. Now i want to write these image sequences into a new video file. How can i achieve this?
Related Question