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
1 answer

Matlab coloured checkerboard

I'm using the Matlab checkerboard function to create a checkerboard. I'm interested in having the checkerboard as stripes (rather than checks) which I have figured out. I also want to change the colour of the stripes so that it's red and white or…
Maheen Siddiqui
  • 539
  • 8
  • 19
0
votes
1 answer

KbCheck (?) unreliable in Psychtoolbox RT paradigm

I am trying to create a simple RT experiment in MATLAB R2014b, using Psychtoolbox. Participants will have to categorize faces, pressing one of two buttons as fast as they can. I created the paradigm on one computer, and it is working fine on that,…
MGy
  • 25
  • 1
  • 7
0
votes
1 answer

Printing variable value in Psychtoolbox

I'm looking for a way to print the value of a variable to the screen in Psychtoolbox (Matlab). I'm looking for something like fprintf: eg. fprintf('%s%d\n','Your score: ', score); I'm guessing that DrawFormattedText() is the function I'm looking…
lharley
  • 21
  • 3
0
votes
1 answer

OpenGL mapping to Psychtoolbox (pixel) coordinates

I asked a similar question some time ago but I think I might be able to formulate it better now. The code below (which I am adapting, not writing from scratch) plots a white bar in the correct place and with a correct angle, pictured below. It uses…
elisa
  • 965
  • 9
  • 27
0
votes
1 answer

repeat numbers in trial structure

How can I tell matlab to use numbers again ? I have 10 Trials but only 8 numbers and I want to tell matlab to repeat the numbers in a randomized order. How can I do this? numbers = {0 1 2 3 4 5 6 7 8};
Carina
  • 3
  • 2
0
votes
0 answers

OpenGL 2D coordinates to Psychtoolbox (pixel) coordinates

I'm modifying a matlab code. It displays graphics using the Psychtoolbox, which can basically create an on-screen window. The code I want to adapt uses both higher-level Psychtoolbox commands and lower-level OpenGL calls, as provided by the Matlab…
elisa
  • 965
  • 9
  • 27
0
votes
1 answer

psychtoolbox accurate timing not flipping at set frame

I'm having problems with psychtoolbox and accurate timing. I wrote my code following the tutorial on the website and the PTBTutorial-ECVP2013.pdf in PsychDocumentation. But it somehow still doesn't work right. It takes way longer than it should (1…
0
votes
1 answer

trial structure psychtoolbox experiment

I want to program an experiment that should consist of 10 trials (10 pictures) that a shown either on the left or right side. At the same time there is a odd or even number shown on the opposite side. I want to measure reaction time and response…
Carina
  • 3
  • 2
0
votes
2 answers

Creating alarm sound in psychtoolbox matlab

I am trying to create an experiment on psychtoolbox and one part of it involves sounding an alarm when the participant fail to respond. I tried using the beep provided but it does not sound like an alarm at all. Is there any way to achieve that…
TYL
  • 1,577
  • 20
  • 33
0
votes
1 answer

Cannot stop sound from replaying in while loop

I am trying to make a sound play continuously if a certain time has passed. Below is my code. However, the sound keeps replaying instead of one continuous sound as it is in a while loop. Putting it outside the while loop will not work as the time is…
TYL
  • 1,577
  • 20
  • 33
0
votes
1 answer

How to make participant input appear on screen and be wrapped (Psychtoolbox)

I’m trying to create a rectangle box on screen in PTB wherein the participant can type text that is wrapped inside this box. So I would like to get the string input to be drawn on screen while typing in a rectangular box where the text input is…
annabrit
  • 1
  • 3
0
votes
1 answer

using getchar in PTB in MATLAB

while 1 ch = GetChar KbWait if (ch>48) && (ch<53) trial(j).RT = GetSecs - startTime ; break; end end here is my sample code, I am working on an Stroop Task, I am expecting to gatjer reaction time. Reaction…
user7245982
0
votes
0 answers

Subfunctions in matlab

I have function called Assignment in Matlab with PsychToolBox. This function shows a random color to the paritcipant and require participant to name the color and record this data. function should return me 2 output as a string rgb code of the…
user7245982
0
votes
1 answer

How can I create a sliding cursor with a particular shape in PsychToolBox?

It supposed to be look like this http://prntscr.com/dezwb6. red rectangle should move as the cursor move. it supposed to be created with while loop but ı have tried with for loop for x=1:1366 % my screen's length if( x > 383) & (x < 983) %…
user7245982
0
votes
2 answers

Shuffling structures within a structure

I have three 1x56 structures - blocks (block1, block 2, block3). I need to create one big structure (experiment), which includes all the blocks, which is not a problem (exp = [block1 block2 block3]). The problem is how to shuffle the blocks within…
malalota
  • 21
  • 4