Reaction time with mouseclick

Hi guys im having great difficulty in coming up with the code for my
experiment. Im presenting subjects with a series of circles that
either appear suddenly or gradually appear and i cant seem to figure
out how to get the reaction time during the for loop.im running on a
windows environment.

i just really need to know how to assess whether the subject has
clicked the mouse!

heres my code so far:


Screen(w,'FillOval',[0 0 255],fixRect);
for j=1:5;
g=floor(18*rand)+1;
Screen(w,'FillOval',white,[xc(g), xd(g), yc(g), yd(g)]);
startTime = GetSecs;
if *dunno what to put here
vartimer = responseSecs-startTime;
end
end

Thanks very much in advance

Niall.
"help GetMouse"

A different question is if a mouse is a suitable device for RT measurements.

best,
-mario

--- In psychtoolbox@yahoogroups.com, "nialllally" <nialllally@...> wrote:
>
> Hi guys im having great difficulty in coming up with the code for my
> experiment. Im presenting subjects with a series of circles that
> either appear suddenly or gradually appear and i cant seem to figure
> out how to get the reaction time during the for loop.im running on a
> windows environment.
>
> i just really need to know how to assess whether the subject has
> clicked the mouse!
>
> heres my code so far:
>
>
> Screen(w,'FillOval',[0 0 255],fixRect);
> for j=1:5;
> g=floor(18*rand)+1;
> Screen(w,'FillOval',white,[xc(g), xd(g), yc(g), yd(g)]);
> startTime = GetSecs;
> if *dunno what to put here
> vartimer = responseSecs-startTime;
> end
> end
>
> Thanks very much in advance
>
> Niall.
>