From: Robert on
I'm using Cogent in Matlab for a psychophysics study. I am displaying pictures (jpegs) and would like the picture to either slowly zoom in or slowly zoom out after a participant responds to the picture. Any idea of how to do this? Code is below:

loadpict('risk1.jpg', 1);
drawpict(1);

EX1choice=0;
while (EX1choice ==0)
reply = readButtonBox(addr+1, 2000)
if reply == 2
EX1choice = 2;
end
if reply == 1
EX1choice = 1;
end
end
From: Walter Roberson on
Robert wrote:
> I'm using Cogent in Matlab for a psychophysics study. I am displaying
> pictures (jpegs) and would like the picture to either slowly zoom in or
> slowly zoom out after a participant responds to the picture. Any idea of
> how to do this? Code is below:
>
> loadpict('risk1.jpg', 1);
> drawpict(1);
>
> EX1choice=0;
> while (EX1choice ==0) reply = readButtonBox(addr+1, 2000)
> if reply == 2 EX1choice = 2;
> end
> if reply == 1 EX1choice = 1;
> end
> end

To zoom by program, set the axes XLim and YLim parameters to the new box you
want to have displayed.

The zoom(factor) command should work in theory, but at least in 2008b I could
not get it to affect an image .