Skip to content

Commit 0824aec

Browse files
committed
make design faster to compute
1 parent fc06703 commit 0824aec

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

subfun/expDesign.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,23 +86,23 @@
8686
% 2 events apart
8787
% - targets cannot be on the first or last event of a block
8888

89-
% Fixation targets
9089
nbTarget = numTargetsForEachBlock(iBlock);
91-
90+
91+
% Fixation targets
92+
forbiddenPositions = [1 NB_EVENTS_PER_BLOCK];
9293
chosenPosition = setTargetPositionInSequence( ...
9394
NB_EVENTS_PER_BLOCK, ...
9495
nbTarget, ...
95-
[1 NB_EVENTS_PER_BLOCK]);
96+
forbiddenPositions);
9697

9798
fixationTargets(iBlock, chosenPosition) = 1;
9899

99100
% Sound targets
100-
nbTarget = numTargetsForEachBlock(iBlock);
101-
101+
forbiddenPositions = [1 NB_EVENTS_PER_BLOCK chosenPosition];
102102
chosenPosition = setTargetPositionInSequence( ...
103103
NB_EVENTS_PER_BLOCK, ...
104104
nbTarget, ...
105-
[1 NB_EVENTS_PER_BLOCK]);
105+
forbiddenPositions);
106106

107107
soundTargets(iBlock, chosenPosition) = 1;
108108

0 commit comments

Comments
 (0)