preventing increased trial durations

Hi there,

I am trying to produce an experiment that involves thousands of trials. Each trial consists of
a movie and a response phase. The problem is that it takes longer and longer to produce a
trial as the experiment wears on. For the first one hundred trials, the average trial duration is
less than 2 seconds. Then by the time I reach trial number 500, the average duration has
exceeded 5 seconds. I am not accumulating any data, and I clear all variables after I'm done
with them. It seems that for some reason matlab/psychtoolbox does not like long "for loops"
when producing dynamic cisplays. Any suggestions on how to prevent the trial duration from
increasing gradually over the course of my experiment?

Thanks alot!

Brian
Dear Brian,

It's hard to say what your problem could be without seeing your
code. Can you post an functioning program that demonstrates the
problem? Which version of the PsychToolbox are you using? Are you
pre-allocating all of your arrays that hold the responses, etc. and
not just adding another entry onto the end of the array?

keith

On Jul 10, 2005, at 12:25 AM, brn_keane wrote:

> Hi there,
>
> I am trying to produce an experiment that involves thousands of
> trials. Each trial consists of
> a movie and a response phase. The problem is that it takes longer
> and longer to produce a
> trial as the experiment wears on. For the first one hundred
> trials, the average trial duration is
> less than 2 seconds. Then by the time I reach trial number 500,
> the average duration has
> exceeded 5 seconds. I am not accumulating any data, and I clear
> all variables after I'm done
> with them. It seems that for some reason matlab/psychtoolbox does
> not like long "for loops"
> when producing dynamic cisplays. Any suggestions on how to prevent
> the trial duration from
> increasing gradually over the course of my experiment?
>
> Thanks alot!
>
> Brian
>
>
>
>
>
>
> 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
>
>
>
>
>
>
>