display

Hello,

I've just started learning using the Psychtoolbox and I want to create
a programm which displays stimuli and records RT. I've created a
subfunction "stimulus" which is called by a function "Test" and
returns a RT. The problem I've encountered is that at the end of each
stimulus presentation, the screen closes and matlab's screen appears
for some msec. Is there a way to avoid this. I would be grateful for
every advice.


Thanks
Pedro,
Psychology student
It's impossible to know without seeing your code, but it sounds like
what you are doing is opening and closing the PsychToolBox screen
multiple times. You should open it once at the beginning of your
experiment and close it at the end of your experiment. If you are
using functions to display your stimuli, etc., you can pass the
windowpointer to the function to draw to the screen you've already
opened.

keith

On Oct 28, 2004, at 8:18 AM, pdr_cardoso wrote:

>
>
>
>
> Hello,
>
> I've just started learning using the Psychtoolbox and I want to create
> a programm which displays stimuli and records RT. I've created a
> subfunction "stimulus" which is called by a function "Test" and
> returns a RT. The problem I've encountered is that at the end of each
> stimulus presentation, the screen closes and matlab's screen appears
> for some msec. Is there a way to avoid this. I would be grateful for
> every advice.
>
>
> Thanks
> Pedro,
> Psychology student
>
>
>
>
>
>
>
>
>
> Post your message to: psychtoolbox@yahoogroups.com
> Please indicate OS9, OSX, or WIN version, and include your full name.
> Denis Pelli, David Brainard, and Allen Ingling.
> http://psychtoolbox.org
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
Pedro,

Most likely you're using the 'openwindow' and 'closewindow' command within your
stimulus subfunction (which do what their names suggest ;-). What you want to do is open
a window in your main (test) function, and pass only the window pointer to your stimulus
function. Within your stimulus function use e.g. the 'fillrect' command to clear your screen.

(next time you post a question, please indicate on which system your working.)

Gr.
Frans Cornelissen

--- In psychtoolbox@yahoogroups.com, "pdr_cardoso" <pdr_cardoso@y...> wrote:
>
>
>
> Hello,
>
> I've just started learning using the Psychtoolbox and I want to create
> a programm which displays stimuli and records RT. I've created a
> subfunction "stimulus" which is called by a function "Test" and
> returns a RT. The problem I've encountered is that at the end of each
> stimulus presentation, the screen closes and matlab's screen appears
> for some msec. Is there a way to avoid this. I would be grateful for
> every advice.
>
>
> Thanks
> Pedro,
> Psychology student