Hi,
This is my fourth day of coding ever so bear with me.
Right now I have a folder with images. I want to present each image from the folder randomly once and only once for a certain number of trials.
So far my code looks like this. It successfully presents a random image from the folder, but it can use the same images over again which I don't want.
How do I make it so that each image in the folder is displayed once and only once?
Thank you in advance for your help!
emotionalImageDirectory = 'C:\PsychExperiment\Emotional';imageTwoVarOne = dir([emotionalImageDirectory '\*.jpg']);imageTwoVarTwo = numel(imageTwoVarOne);idx = randi(imageTwoVarTwo);loadimageTwo = imread(imageTwoVarOne(idx).name);
Best Answer