Random presentation of stimuli equally on left and right side of the screen
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
dpb
2022-6-26
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
2022-6-26
@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];
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Formatting and Annotation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!