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

조회 수: 1 (최근 30일)
ANKIT MAURYA
ANKIT MAURYA 2022년 6월 25일
댓글: Jonas 2022년 6월 26일
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
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
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 CenterFile Exchange에서 Formatting and Annotation에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by