Make an image appear on screen

8 views (last 30 days)
Brett
Brett on 6 Nov 2012
Hi, I'm really new to this and what I want is for an image from a .png file to appear on screen at a location of my choice. This is what I have so far:
Code for fixation cross:
screenNum=0;
[window, rect] = Screen('OpenWindow', screenNum, 1);
[X,Y] = RectCenter(rect);
FixCross = [X-1,Y-40,X+1,Y+40;X-40,Y-1,X+40,Y+1];
Screen('FillRect', window, [255,255,255], FixCross');
Screen('Flip', window);
HideCursor;
WaitSecs(2);
name associated with the image:
green_down = 'GreenDown.png'; green_downarrow = imread(green_down);
I want the image(green_down) to appear in a particular quadrant on the same screen as the fixation cross. I tried using imshow, but that causes a new window to open and that isn't what I want. Also, I am using psychtoolbox, if that means anything.
Any help would be greatly appreciated, thanks,
Brett

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!