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 revisionPrevious revision
Next revision
Previous revision
biac:experimentalcontrol:biac6hardware [2024/04/15 20:07] – [BIAC6 Screen Configuration] cmp12biac:experimentalcontrol:biac6hardware [2024/06/21 15:44] (current) – external edit 127.0.0.1
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.
 +
 +Matlab:
 +<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/06/21 15:44 by 127.0.0.1