User Tools

Site Tools


biac:experimentalcontrol:biac6hardware

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
biac:experimentalcontrol:biac6hardware [2024/04/15 20:07]
cmp12 [BIAC6 Screen Configuration]
biac:experimentalcontrol:biac6hardware [2024/04/15 20:26]
cmp12 [BIAC6 Screen Configuration]
Line 209: Line 209:
   * screen 0 in PTB   * screen 0 in PTB
  
 +
 +One of the best ways to account for a variable to setup in matlab would be to code the task to work with either.
 +
 +<code matlab>
 +screens=Screen('Screens');
 +
 +%if there is only 1 entry
 +if (length(screens) == 1)
 +    %use it
 +    S.screenNumber = min(screens);
 +%but if there are more, use #1 explicitely
 +elseif (length(screens) > 1)
 +    S.screenNumber = screens(2);
 +    %same as S.screenNumber = 1;
 +end 
 +
 +[S.Window, S.screenRect]=Screen('OpenWindow',S.screenNumber, S.screenColor,[],[],2,[],[]);
 +</code>
  
  
biac/experimentalcontrol/biac6hardware.txt · Last modified: 2024/04/16 14:21 by cmp12