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
2
votes
2 answers

MATLAB has encountered an internal error and needs to close

I've just installed the new MATLAB R2013b for 64bit Mac, and my OS is OS X 10.8.4. I'm running into a consistent problem that I never had with R2013a. When I run one of my scripts (see below), the entire script goes through OK, but then I keep…
JR Meyer
  • 232
  • 3
  • 11
2
votes
0 answers

How can I get events from a generic USB HID device in Psychtoolbox-3?

I have a Griffin Technology 'PowerMate' USB knob. It's apparently HID compliant, and I'm able to detect it with the following bit of code: LoadPsychHID; devs = PsychHID('Devices'); for i = 1:length(devs) index = devs(i).index; if…
Louis Thibault
  • 20,240
  • 25
  • 83
  • 152
2
votes
3 answers

Random color matrix in matlab

I would like to generate a matrix of random color blocks -- 10 by 10 pixel blocks of random colors -- such as: https://i.stack.imgur.com/Jlc8L.png So far, I have generated random numbers and enlarged the matrix with…
2
votes
1 answer

Achieving best timing online for psychophysics experiments using Python on the web

I want to display visual/auditory stimuli inside a web browser for psychophysic experiments. I plan on using python, but I am concerned with timing. I obviously can not rely on screen refresh for timing which is common in these types of tasks. How…
Jabda
  • 1,752
  • 5
  • 26
  • 54
1
vote
0 answers

DrawformattedText error in fuction TextBounds Matlab

I have an unsolved problem on my computer, my code work in other ones. Run the code without DrawFormattedText is ok (I displayed some picture in other parts of the code). Here is the code to display the text: Screen('Preference', 'SkipSyncTests',…
1
vote
1 answer

Best Approach to manipulate level colors in a scatterplot - ggplot2 (layering plots and/or assigning colors to specific row values/or something else?)

Here is a sample of my data frame: HRdetails <- data.frame(avgHR = c(96,115,130,120,112,87,112,114,116,140), DetailCount = c(5,18,4,3,9,2,10,11,19,15), PID = c(1,1,1,1,1,2,2,2,2,2), Section =…
sreis
  • 13
  • 3
1
vote
1 answer

Oct2Py gives "TypeError: cannot unpack non-iterable float object" with Psychtoolbox function returning multiple arguments

I am running a very basic Psychtoolbox example from their site using Oct2py package and I am facing an issue that is happening when I am trying to return two float values for that it looks like: from oct2py import octave import sys def ptb(): #…
theEarlyRiser
  • 134
  • 12
1
vote
1 answer

Keyboard combination detection in Psychtoolbox-3

I want my experiment to have a key-combination to serve as an indicator to elicit an initiated exit from the experiment. Now I have this code, which detects a single key press: while(1) [keyIsDown,~,keyCode]=KbCheck; if keyIsDown …
Sharonas Ykm
  • 427
  • 2
  • 4
  • 13
1
vote
0 answers

Send a big matrix to a fragment shader in GLSL version 120

I need to draw an animated texture with many parameters. All of these parameters (matrix 10x200) will be changed in each frame. I try to send them to fragment shader as uniforms with glUniform*fv but it seems it is too much. If I try to use fewer…
zlon
  • 812
  • 8
  • 24
1
vote
0 answers

Script works with keyboard, but only inconsistent with responsebuttons

In my script I want to record responses (keyboard r or response button click) while I show different stimuli (image1, image2). The loop (trial) always shows image1, then image2 and stores the recorded time of the click as we need the response times.…
yenea
  • 11
  • 3
1
vote
0 answers

MatlabExecutionError: Usage: with Psychtoolbox in MATLAB Engine API for Python

I am working on a Python script in which I have to call some Matlab Psychtoolbox functions to open a screen window and display a dot. I am trying to use the Matlab Engine API for Python: when running the code I get a MatlabExecutionError: Usage: for…
mordecai9
  • 11
  • 2
1
vote
0 answers

Matlab crash after 30 minutes

A program containing Psychtoolbox functions crashes after running for 30 minutes when receiving trigger inputs (approx. 3 triggers per second), but runs the full 90 minutes when no trigger is connected. None of the arrays in the program appear to be…
sw2019
  • 11
  • 2
1
vote
2 answers

How to store two variables (x.y) from a loop?

I am generating two different coordinates (x, y) within a loop. In my code, I have just realised that it is saving the last variable from the loop. I am, however, trying to save all the iterations from the setsize variable. I already tried to save…
Astrid
  • 15
  • 3
1
vote
1 answer

Divide screen experiment in upper/lower part

I am new with Matlab and Psychtoolbox, and I have three codes : One code that creates circles with a certain pattern of movement that we can call pattern 1 Another code that creates circles with a different pattern of movement (pattern 2) A code…
Kathia
  • 502
  • 2
  • 7
  • 20
1
vote
1 answer

Psychtoolbox DrawText causes so many missed flips (Matlab)

I am having timing issues with my experiment, I am trying to implement an SSVEP speller with flashing boxes. At each frame I implement the following code that creates the rectangle with the specified color and I use to "DrawText" to indicate the…
1
2
3
11 12