To create four blocks of images to be shown in random order in Matlab, you can follow the steps below:
dir
function to get a structure containing information about the image files in the directory.imread
function.randperm
function to generate a random permutation of the numbers from 1 to 4.imshow
function.Here's the code:
main.m761 chars27 lines
In this code, the images are read into a cell array and then displayed in a random order using the imshow
function. Note that you can add any delay between the display of each image using the pause
function if required.
gistlibby LogSnag