Random presentation of stimuli equally on left and right side of the screen

1 visualización (últimos 30 días)
Hi Everyone,
I need to present gray oval randomly on the left and right side of the screen from the centre for equal number of times (105 each), thus total will be 210 number of trials . How can i do this ? and how to ensure when it was presented on left and when right ?
Please help me as i am stucked badly onto this.
  11 comentarios
dpb
dpb el 26 de Jun. de 2022
Would you PLEASE format the code snippets you post so they are readable as code???!!!????!!!!!
You continue to not provide any links to the functions being called and we don't have the toolbox -- I can't find the doc for any of these functions and I don't see any Psych Toolbox on the TMW MATLAB product site. Where does all this stuff come from so we can see the doc on how to use it?
To solve your problem well, you'll need to dive into the doc for how those drawing methods are used; certainly the ratios given by @Jonas of < and > 1 appear to move the object on the display, but certainly by the law of ratios, 1.5*X and X/1.5 do NOT equate to the same absolute change in X so the number of pixels moved either direction isn't the same which is the effect one would presume you're looking for.
But, we don't know the actual use; we're just guessing because we don't have the needed doc...and you're not providing any really useful information by simply describing what you don't like...
Jonas
Jonas el 26 de Jun. de 2022
@dpb apparently i lost my brain before suggesting those values. of course thats could not be correct.
if you got your resolution
screenXpixels, screenYpixels
and you keep the width of the rectangle and the the 4 values are the values of the 4 borders left top right bottom (not like in matlab x y width height, and also also not like on Latex {screw you psych toolbox }), then use as left rectangle
w=200;
h=250;
[screenXpixels screenYpixels screenXpixels screenYpixels].*[0.25 0.5 0.25 0.5]+[-w/2 +h/2 +w/2 -h/2];
and for the right
[screenXpixels screenYpixels screenXpixels screenYpixels].*[0.75 0.5 0.75 0.5]+[-w/2 +h/2 +w/2 -h/2];

Iniciar sesión para comentar.

Respuestas (0)

Etiquetas

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by