Psychtoolbox- Error Using Screen
Hi everyone, I’m encountering an issue with a section of code from a script. It keeps closing out with an error, and I’m not sure why. The error message reads as follows:
Error using Screen
Usage:
Screen(‘DrawTexture’, windowPointer, texturePointer [,sourceRect] [,destinationRect] [,rotationAngle] [, filterMode] [, globalAlpha] [, modulateColor] [, textureShader] [, specialFlags] [,
auxParameters]);
Error in memcongr (line 802)
Screen(‘DrawTexture’, window, leftStimuli{iTrial}, [], LeftPatch{iTrial});
The variables leftStimuli & LeftPatch are defined as:
leftStimuli = cell(1,nruns);
LeftPatch = cell(1,length(rightselection{oldtrialsperrun}));
Also, these variables are defined as:
oldtrialsperrun:
oldtrialsperrun = 5;
luretrialsperrun= 3;
nTrialsTotal = oldtrialsperrun + luretrialsperrun;
rightselection
images_encoding_stim = Shuffle(stimuli);
leftStimuli = cell(1,nruns);
RightStimuli = cell(1,nruns);
% Ensure the equality of the number of stimuli
total_stimuli = length(images_encoding_stim);
half_stimuli = floor(total_stimuli / 2);
% Divide into two groups: right position and left position
rightselection = images_encoding_stim(1:half_stimuli);
leftselection = images_encoding_stim(half_stimuli+1:end);
clear half_stimuli
% Divide for each run (here you get a code with the stimuli you need to present on the right and left sides)
for irun = 1:nruns
stimuliPerRunRight{irun} = {rightselection(1+(irun-1)*oldtrialsperrun : irun*oldtrialsperrun)};
stimuliPerRunLeft{irun} = {leftselection(1+(irun-1)*oldtrialsperrun : irun*oldtrialsperrun)};
end
Thank you very much for everything. I’ve been stuck with this error for a couple of months. I’m very willing and open to answering questions about any part of the code in order to get it working.Hi everyone, I’m encountering an issue with a section of code from a script. It keeps closing out with an error, and I’m not sure why. The error message reads as follows:
Error using Screen
Usage:
Screen(‘DrawTexture’, windowPointer, texturePointer [,sourceRect] [,destinationRect] [,rotationAngle] [, filterMode] [, globalAlpha] [, modulateColor] [, textureShader] [, specialFlags] [,
auxParameters]);
Error in memcongr (line 802)
Screen(‘DrawTexture’, window, leftStimuli{iTrial}, [], LeftPatch{iTrial});
The variables leftStimuli & LeftPatch are defined as:
leftStimuli = cell(1,nruns);
LeftPatch = cell(1,length(rightselection{oldtrialsperrun}));
Also, these variables are defined as:
oldtrialsperrun:
oldtrialsperrun = 5;
luretrialsperrun= 3;
nTrialsTotal = oldtrialsperrun + luretrialsperrun;
rightselection
images_encoding_stim = Shuffle(stimuli);
leftStimuli = cell(1,nruns);
RightStimuli = cell(1,nruns);
% Ensure the equality of the number of stimuli
total_stimuli = length(images_encoding_stim);
half_stimuli = floor(total_stimuli / 2);
% Divide into two groups: right position and left position
rightselection = images_encoding_stim(1:half_stimuli);
leftselection = images_encoding_stim(half_stimuli+1:end);
clear half_stimuli
% Divide for each run (here you get a code with the stimuli you need to present on the right and left sides)
for irun = 1:nruns
stimuliPerRunRight{irun} = {rightselection(1+(irun-1)*oldtrialsperrun : irun*oldtrialsperrun)};
stimuliPerRunLeft{irun} = {leftselection(1+(irun-1)*oldtrialsperrun : irun*oldtrialsperrun)};
end
Thank you very much for everything. I’ve been stuck with this error for a couple of months. I’m very willing and open to answering questions about any part of the code in order to get it working. Hi everyone, I’m encountering an issue with a section of code from a script. It keeps closing out with an error, and I’m not sure why. The error message reads as follows:
Error using Screen
Usage:
Screen(‘DrawTexture’, windowPointer, texturePointer [,sourceRect] [,destinationRect] [,rotationAngle] [, filterMode] [, globalAlpha] [, modulateColor] [, textureShader] [, specialFlags] [,
auxParameters]);
Error in memcongr (line 802)
Screen(‘DrawTexture’, window, leftStimuli{iTrial}, [], LeftPatch{iTrial});
The variables leftStimuli & LeftPatch are defined as:
leftStimuli = cell(1,nruns);
LeftPatch = cell(1,length(rightselection{oldtrialsperrun}));
Also, these variables are defined as:
oldtrialsperrun:
oldtrialsperrun = 5;
luretrialsperrun= 3;
nTrialsTotal = oldtrialsperrun + luretrialsperrun;
rightselection
images_encoding_stim = Shuffle(stimuli);
leftStimuli = cell(1,nruns);
RightStimuli = cell(1,nruns);
% Ensure the equality of the number of stimuli
total_stimuli = length(images_encoding_stim);
half_stimuli = floor(total_stimuli / 2);
% Divide into two groups: right position and left position
rightselection = images_encoding_stim(1:half_stimuli);
leftselection = images_encoding_stim(half_stimuli+1:end);
clear half_stimuli
% Divide for each run (here you get a code with the stimuli you need to present on the right and left sides)
for irun = 1:nruns
stimuliPerRunRight{irun} = {rightselection(1+(irun-1)*oldtrialsperrun : irun*oldtrialsperrun)};
stimuliPerRunLeft{irun} = {leftselection(1+(irun-1)*oldtrialsperrun : irun*oldtrialsperrun)};
end
Thank you very much for everything. I’ve been stuck with this error for a couple of months. I’m very willing and open to answering questions about any part of the code in order to get it working. psychtoolbox, screen MATLAB Answers — New Questions