Questions tagged [psychtoolbox]

a MATLAB and GNU/Octave toolbox for the creation of visual (OpenGL based) and auditory displays. It is particularly geared toward vision research applications.

Psychtoolbox is a MATLAB and GNU/Octave toolbox for the creation of visual (OpenGL based) and auditory displays. It is particularly geared toward vision research applications. Given its focus on vision research applications, the toolbox places great emphasis on enabling frame accurate display of visual stimuli, with synced audio presentation, TLL and other triggers and response collection. Through and interface to GStreamer, PsychToolBox also allows the presentation and recording of video files.

More information can be found on the PsychToolBox website.

177 questions
0
votes
2 answers

How can I get pixel information from DrawFormattedText

I'm using the function DrawFormattedText to present text in Psychtoolbox. I'm wondering how I could count the number of pixels produced by the text from this function. A minimal example looks like this (you should be able to copy/paste this): [w,…
KerrBer
  • 129
  • 11
0
votes
1 answer

Sequence of dots in matlab and psychotoolbox

How would i display one by one dots that are in a 3x3 matrix such as in the code below? I would like to have dot1 appears in position [x1,y1] of the grid for a time t1, then dot2 to appears in position [x2,y2] of the grid for a time t2. Only one dot…
Francis
  • 3
  • 2
0
votes
1 answer

How do i get the bounding rect of each word in a text (for reading eyetracking)?

For an eye tracking study i need the positions of each word in a text drawn to the window. I can see how I can get the bounding box of the whole text as a return value using [nx, ny, textbounds] = DrawFormattedText(win, tstring) Is there a better…
sven.io
  • 3
  • 1
0
votes
1 answer

Matlab 2015 & Psychtoolbox 3: CenterRect - square not centered

This short program is supposed to show a green full-screen background and a red square of 400 x 400 px in the center. However, the red square is at the top-lef corner [0, 0, 400, 400] instead of centered. try screens = Screen('Screens'); % check…
JoHKa
  • 138
  • 9
0
votes
1 answer

Repeating trials in MatLab

i'm am very new to Matlab but really want improve. For my experiment i want to show a picture which the participant response yes/no to, using two different keys (f&g) and then the next picture is presented and it repeats so onward. Presenting the…
0
votes
2 answers

ind2sub indexing not working

I am creating a task in psychtoolbox and I need a grating for that. I made the grating and it is working well, but now I just want to cut some pieces out of it by setting those matrix elements to zero (currently I am using a mask instead, but I want…
Mats
  • 1
  • 1
0
votes
1 answer

printing from Screen in Matlab/Psychtoolbox

I have a drawn a random dot matrix on the screen using matlab/psychtoolbox like this: Screen('DrawDots', wPtr, dotPositionMatrix, dotSizes, dotColors, dotCenter, 2); Screen('Flip', wPtr, (stimVbl + STIMULUS_DURATION - .5 * ifi), 0); Now I want to…
0
votes
2 answers

Psychtoolbox OpenGL - draw a line

I need is a single line rendered from within PsychToolBox in Matlab. So: glBegin(GL.LINES); glVertex3f(0, 0, 0); glVertex3f(1, 1, 1); glEnd; Returns: ??? The class "GL" is undefined. Perhaps Java is not running. I'm using the code provided…
egor.ananyev
  • 347
  • 4
  • 9
0
votes
2 answers

KbWait won't register key press

I'm trying to collect keyboard data, but I can't get KbWait to work. In the following code, I'm trying to wait for the participant to respond, check if their response is one of two acceptable answers, and then continue. It should only continue when…
Nathan
  • 340
  • 2
  • 11
0
votes
1 answer

Accelerating wheel - psychtoolbox in MATLAB

I am trying to write a code that will show an accelerating wheel. As long as the user presses 'a' the wheel should accelerate counterclockwise. The thing is that it turns in the right direction but it doesn't accelerate. This is the code I am using…
ariel
  • 2,637
  • 4
  • 20
  • 12
0
votes
3 answers

Psychtoolbox: Can I save pre-drawn textures to my hard drive?

In my experiment I am displaying lots of different gratings. To save time during the experiment's execution, I'm pre-drawing the corresponding textures and keep them in a buffer. However, this takes about 10-20 seconds depending on how many stimuli…
Chris
  • 1
  • 1
0
votes
2 answers

Stop program, wait for a specific keyboard input and then continue program in Psychtoolbox MATLAB?

I am having a hard time figuring out how the KbCheck function works and how I can use it to pause whatever my program is doing, wait for the spacebar to be pressed and then resume with the program. KbCheck's documentations has this: [keyIsDown,…
user241691
  • 37
  • 1
  • 10
0
votes
1 answer

FillRect Psychtoolbox constantly causing error

My code: Screen('OpenWindow', 0, [0 0 0], [0 0 600 600]) Screen('FillRect', win, [0 255 0 ], [0 0 50 50]); Screen('Flip', win); I understand that the documented line is: Screen('FillRect', windowPtr [,color] [,rect] ) With windowPtr as just a…
user241691
  • 37
  • 1
  • 10
0
votes
1 answer

How to hold a background image and place others on top of them (using Psychtoolbox)?

We are using the Psychtoolbox in Matlab to make an experiment. We want to do is placing smaller images (locations are specified beforehand) over a large one. The trouble is that we lose the background image once we try putting the smaller ones on…
Boreq
  • 95
  • 6
0
votes
0 answers

Crash Dump 3564

I'm using GUI and playing sound through psychotoolbox and have this error: *Matlab Crash ...\matlab_crash_dump.3564-1: Segmentation violation detected > at Sat May ... Configuration: Crash Decoding : Disabled Default Encoding: windows-1252…
ranell
  • 683
  • 13
  • 29
1 2 3
11
12