pb_vRunExp.m 1.25 KB
Newer Older
Jesse Heckman's avatar
Jesse Heckman committed
1
function pb_vRunExp(expinfo,h)
Jesse Heckman's avatar
Jesse Heckman committed
2
3
4
5
6
7
8
9
10
11
12
13
14
% PB_VRUNEXP(varargin)
%
% PB_VRUNEXP() forms the core body of experimental paradigms in the VC, and 
% will loop over the trials.
%
% See also ...

% PBToolbox (2018): JJH: j.heckman@donders.ru.nl


   %% INITIALIZE
   %  load & read experiment
   
Jesse Heckman's avatar
Jesse Heckman committed
15
16
17
   [block, cfg]    = pb_vReadExp(expinfo.expfile); % struct
   nblocks         = cfg.Blocks;
   nTotTrials      = cfg.Trials;
Jesse Heckman's avatar
Jesse Heckman committed
18
   
Jesse Heckman's avatar
Jesse Heckman committed
19

Jesse Heckman's avatar
Jesse Heckman committed
20
21
22
23
24
   
   
   %% BODY
   %  iterate experiment
   
Jesse Heckman's avatar
Jesse Heckman committed
25
   for iBlock = 1:nblocks
Jesse Heckman's avatar
Jesse Heckman committed
26
27
28
29
      nTrials  = length(block(iBlock).trial);   
      signal   = block(iBlock).signal;          
      
      pb_vSafety(signal);                       % Checks for safe vestibular parameters!! 
Jesse Heckman's avatar
Jesse Heckman committed
30

Jesse Heckman's avatar
Jesse Heckman committed
31
32
33
34
35
36
      
      for iTrial = 1:nTrials
      %pb_vClearTrial();
      %pb_vRecordData();
      %pb_vRunTrial(experiment(iTrial));
      %pb_vFeedbackGUI();
Jesse Heckman's avatar
Jesse Heckman committed
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
   end
   
   
   %% CHECK OUT
   %  store data
   
   
   
   
end
 
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % 
%                                                           %
%       Part of Programmeer Beer Toolbox (PBToolbox)        %
%       Written by: Jesse J. Heckman (2018)                 %
%                                                           %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %