MATLAB: How to load a folder of images in variables using for loop and arrays

duplicate postprocess a sequence of files

Im working on dip.I have a folder of binary images and i want to create variable to each image using arrays and for loop concept

Best Answer

This is dealt with quite thoroughly in the MATLAB Wiki:
Do not try to create a separate dynamically named variable for each file. Save them in a cell array or structure instead: