I am using Psychtoolbox to display on a screen as part of an interface. I create a blank screen with [win,Rect]=Screen('OpenWIndow',etc.etc...)
in my main script. I would like to use a function call later on in the script to update the screen, but I have no idea how to get the values in and out of the function to change the Screen.
So something like:
%main script
[win,Rect]=Screen('OpenWIndow',0,[0 0 0],[0 0 1280 1024]);
%do other processing (in my case communicating with another computer.)
DrawStuff() %function that takes variables from script and updates the screen
% continue script