I'm trying to present a sequence of images in random order, where each randomly selected image is followed by an image of a fixation cross.
I've managed to write code to do this, however each time an image is presented, it starts in the small window and is then maximised. Is there a way to get it so that each image opens immediately full screen and the window stays constant throughout the sequence (similar to a powerpoint presentation?)
I have never done any coding before and I am a psychologist who usually deals with qualitative data so this is all very new to me and I have no idea what i'm doing! Any help would be much appreciated.
This is what I've got so far:
H = imread ('fixcross.jpg'); L = [ 'x','y','z'] ; p = L(randi(numel(L))) files = dir([p '\*.jpg']) ; % all jp gimages in folder
N = length(files) ; % total files
idx = randperm(N) ; % random order of numbers till N
for i = 1:N % loop for each file
A = files(idx(i)).name % Filename of random image
imread(A); imshow(A); set(gcf,'MenuBar','none') set(gca,'DataAspectRatioMode','auto') set(gca,'Position',[0 0 1 1]) set(gcf, 'Position', get(0, 'Screensize')); pause(2); imshow(H); set(gcf,'MenuBar','none') set(gca,'DataAspectRatioMode','auto') set(gca,'Position',[0 0 1 1]) set(gcf, 'Position', get(0, 'Screensize')); pause(0.5); end
Best Answer