draw a square?

>Dear Dr. Pelli,
>
>My name is Bhargav Katikaneni and I'm a junior at Ossining High School
>in Ossining, New York. I plan on conducting psychophysics research using
>the Mat Lab(R12) with the psychophysics toolbox. In my experiments, I'm
>using the recognition memory test in a visual working memory task. I
>have various Mat Lab manuals, but I've been unable to find the Mat
>Lab code to create 2d objects such as squares and rectangle. I would
>like to present these shapes at timed intervals to test for accuracy
>of subject responses. Can you help me with my problem? Thank you for
>your help.
>
>Sincerely,
>
>Bhargav Katikaneni.
>

dear Bhargav Katikaneni

in the future please send your requests for assistance in programming
to the forum. i support the psychtoolbox in my spare time, and all i
have time for is development and maintenance.

however, here's a minimal program to draw a square

w=screen(0,'openwindow');
black=blackindex(w);
screen(w,'fillrect',black,[50 50 150 150]);
getclicks; % wait until user clicks the mouse
screen(w,'close');

good luck in your project.

best

denis pelli