This shows you the differences between two versions of the page.
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(' | ||
+ | |||
+ | %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(' | ||
+ | </ | ||