Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jesse Heckman
pbtoolbox
Commits
a682c9f9
Commit
a682c9f9
authored
Nov 20, 2018
by
Jesse Heckman
Browse files
update genexp vc
parent
51dbaf36
Changes
2
Hide whitespace changes
Inline
Side-by-side
setups/vestibular chair/vPrime/experiment/pb_vFixLed.m
View file @
a682c9f9
...
...
@@ -27,11 +27,11 @@ function VIS = pb_vFixLed(VIS,fixled,varargin)
c
=
1
;
for
i
=
length
(
VIS
)
-
1
if
VIS
(
c
)
.
EventOn
==
VIS
(
c
+
1
)
.
EventOn
stimdur
=
VIS
(
c
+
1
)
.
Offset
-
VIS
(
c
+
1
)
.
Onset
;
VIS
(
c
+
1
)
.
Onset
=
VIS
(
c
)
.
Onset
+
dur
;
%VIS(c+1).Offset = VIS(c).Offset + dur;
end
if
VIS
(
c
)
.
EventOff
==
VIS
(
c
+
1
)
.
EventOff
%
VIS(c+1).Offset = VIS(c+1).O
ff
set + dur;
VIS
(
c
+
1
)
.
Offset
=
VIS
(
c
+
1
)
.
O
n
set
+
stim
dur
;
end
c
=
c
+
1
;
end
...
...
@@ -42,5 +42,4 @@ end
% Part of Programmeer Beer Toolbox (PBToolbox) %
% Written by: Jesse J. Heckman (2018) %
% %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
\ No newline at end of file
setups/vestibular chair/vPrime/experiment/pb_vGenVisExp.m
View file @
a682c9f9
...
...
@@ -79,7 +79,7 @@ function pb_vGenVisExp(varargin)
modality
=
2
;
% 2=VISUAL
int
=
[
50
];
% w/ [i1, i2, i3...]
dur
=
[
50
0
];
% stim duration in ms
dur
=
[
1
3
5
10
3
0
];
% stim duration in ms
col
=
[
1
];
% w/ [R,G]
[
X
,
~
,
~
]
=
ndgrid
(
X
,
0
,
col
,
int
,
dur
);
...
...
@@ -142,7 +142,8 @@ function writeexp(expfile,datdir,theta,phi,int,dur,block,fixled)
pb_vWriteBlock
(
fid
,
iBlock
);
pb_vWriteSignal
(
fid
,
block
(
iBlock
));
pl
=
randperm
(
trialsz
);
% randomize trialorder in blocks
pl
=
1
:
trialsz
;
%pl = randperm(trialsz); % randomize trialorder in blocks
for
iTrial
=
1
:
trialsz
% Write trials
...
...
@@ -159,11 +160,10 @@ function writeexp(expfile,datdir,theta,phi,int,dur,block,fixled)
VIS
.
EventOff
=
0
;
VIS
.
Offset
=
VIS
.
Onset
+
dur
(
pl
(
iTrial
));
VIS
=
pb_vFixLed
(
VIS
,
fixled
,
'x'
,
fixled
.
x
,
'y'
,
fixled
.
y
,
'dur'
,
fixled
.
dur
);
pb_vWriteStim
(
fid
,
2
,[],
VIS
);
VIS
=
pb_vFixLed
(
VIS
,
fixled
,
'x'
,
fixled
.
x
,
'y'
,
fixled
.
y
,
'dur'
,
fixled
.
dur
);
trlIdx
=
trlIdx
+
1
;
trlIdx
=
trlIdx
+
1
;
pb_vWriteStim
(
fid
,
2
,[],
VIS
)
;
end
end
fclose
(
fid
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment