What function can I use in MATLAB 2016a to replace "BlackIndex" and "Screen"? These do not work with my version of MATLAB.
Show older comments
I am trying to run some old code passed on to me. It contains the functions "BlackIndex", "WhiteIndex", and "Screen", but none of these are recognized by my version of MATLAB - 2016a. Is there a different function that I can use instead, or can I extract this information a different way?
Here is the current code which does not work in my version of MATLAB:
backgroundColor = BlackIndex(screenNumber);
foregroundColor = WhiteIndex(screenNumber);
[window, windowrect] = Screen(screenNumber, 'OpenWindow', backgroundColor);
% Create light blue colored screen
wBB= Screen(window,'OpenOffscreenWindow',[238 238 175],[0 0 resx resy]);
% Copy black screen to wCopy
wCopy = Screen(window,'OpenOffscreenWindow');
Screen('CopyWindow',window,wCopy);
Accepted Answer
More Answers (0)
Categories
Find more on Timing and presenting 2D and 3D stimuli in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!