Appologize for bothring the forum again, but it's not a too hard one I
hope:
I want the computer to randomly present the stimuli in the center,
left or right side
of the display.
I know that it can be done easily by adding attribute ("side") in the
trial list with values of left right or center and then to define the
X axis of the image in the slide object as [side] and that's all.
However, this method means that I have to insert manualy all different
combinations -and it's not an elegant solution.
I tried to define side as a new attribute in an inline object this way
c.SetAttrib "side", RandomizeArray(1,3,4)
of course-it didn't work and I tried many different configurations and
randomization commands. With which command can I randomize left,
center and right?
Thanks,
Gilis
I think this should work: Have an attribute in the list, let's say
"posX". Refer to the x values of the bitmaps with [posX]. If I
understood you correctly, the y value is not to be changed. If yes,
this can also be done without problems.
Well, have an inline like this before the display appears:
dim x as integer
x = random(1,3)
if x = 1 then c.setattrib "posX", 200
if x = 2 then c.setattrib "posX", 400
if x = 3 then c.setattrib "posX", 600
This will set posX randomly to 200, 400 or 600 and of course you can
change these values.
However, if you really want to make sure that each subject had each
condition equally often, you should go for setting this in the list.
This is imho the more elegant way ;)
Best,
Tobias
Anyway, we have discussed randomising location fully and thoroughly in the seminal E-Primer (www.cognitology.eu, under references) and the easiest would be just to use percentage. I don't see where 'side' comes in... Just use two attributes [XLoc], [YLoc] if you will, use % values in your list and voila.
"c.SetAttrib "side", RandomizeArray(1,3,4)"
...makes very little sense. If you are using "Side" to set your location, why do you want to fill it (I guess) with 1, 3 or 4? Are those pixels? 3 is about 2 pixels to the right of 1... Are you trying to randomize a list? If you have many combinations, I suggest looking up nested lists in the user guide / getting started guide.
Cheers,
Mich
Michiel Spapé
Research Fellow
Perception & Action group
University of Nottingham
School of Psychology
Hi to all again,
c.SetAttrib "side", RandomizeArray(1,3,4)
Thanks,
Gilis
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-p...@googlegroups.com.
To unsubscribe from this group, send email to e-prime+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.
This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
As Michiel says, setting out the full set of combinations into a List is
pretty much the "E-Prime way". However, if you mean to combinatorically
mix one set of attributes (e.g., stimulus location) with other
attributes, then you might look into nested Lists. In that case, first
work through the Nested List tutorial in Appendix C of the User's Guide
that came with E-Prime, and see if that gives you any ideas. And of
course, do also look through Michiel's E-Primer.
-- David McFarlane, Professional Faultfinder
Michiel Spape wrote:
> Hi Gilis,
> What may be unelegant programming-wise, I often find much better psychologically, for some reason! That is, yes, it seems like an awful lot to tell a programme to use "red", "green", "blue" for a Stroop task and then having to bother with setting all 9 combinations, rather than, for example, setting one attribute (congruence) and using a little script to randomly set colours and words. Still, I would advise you to use the list anyway; it provides much more clarity for yourself and others, its randomising tends to give better results than randomizing with replacement, and, well, you don't need to learn so much E-Basic programming.
>
> Anyway, we have discussed randomising location fully and thoroughly in the seminal E-Primer (www.cognitology.eu, under references) and the easiest would be just to use percentage. I don't see where 'side' comes in... Just use two attributes [XLoc], [YLoc] if you will, use % values in your list and voila.
>
> "c.SetAttrib "side", RandomizeArray(1,3,4)"
> ...makes very little sense. If you are using "Side" to set your location, why do you want to fill it (I guess) with 1, 3 or 4? Are those pixels? 3 is about 2 pixels to the right of 1... Are you trying to randomize a list? If you have many combinations, I suggest looking up nested lists in the user guide / getting started guide.
> Cheers,
> Mich
>
>
>
>
>
>
>
>
> Michiel Spap�
Sure it make a little sense, it was just an hypothetical example ;) -
meaning that I was trying to find a way to randomize three dichotomic
values (e.g., a , c and d without the sequence between them).
Somehow "RandomizeArray" was associatively connected in my mind
with similar suffix functions from Matlab -I was sure it can be done
in Eprime as well...For the present experiment I will use the list,
but anyway wanted to know the alternatives. Thank you very much for
the link, I hope to use it intensively.
Cheers
Gilis
On 22 פברואר, 18:13, Michiel Spape <Michiel.Sp...@nottingham.ac.uk>
wrote:
> For more options, visit this group athttp://groups.google.com/group/e-prime?hl=en.
Just can't let this sit (even though Mich & I disagree on this point
of programming style :) ), so here is the same code in two more
different styles:
dim x as integer
x = random(1,3)
if x = 1 then
c.setattrib "posX", 200
elseif x = 2 then
c.setattrib "posX", 400
elseif x = 3 then
c.setattrib "posX", 600
end if
or
dim x as integer
select case random(1,3)
case 1
c.setattrib "posX", 200
case 2
c.setattrib "posX", 400
case 3
c.setattrib "posX", 600
end select
On 22 פברואר, 19:01, Michiel Spape <Michiel.Sp...@nottingham.ac.uk>
wrote:
> Hi,
> Seems fine here:http://www.cognitology.eu/about_me.htmbelow everything else. PDF takes some time to load, so I'd suggest right-clicking and using "save link as".
> For more options, visit this group athttp://groups.google.com/group/e-prime?hl=en.
On 22 פברואר, 19:19, Michiel Spape <Michiel.Sp...@nottingham.ac.uk>
dim x as integer
x = random(1,3)
if x = 1 then c.setattrib "posX", 200
if x = 2 then c.setattrib "posX", 400
if x = 3 then c.setattrib "posX", 600
...rather than my...
Dim Locs() as integer
Dim i as integer
For i = 1 to 640
Locs(i) = i
Next i
RandomizeArray Locs
As I tried to explain usage of RandomizeArray... Still, my choice for your example, without randomized arrays would be:
dim x as integer
c.SetAttrib "posX", 200 * random(1,3)
Hatsekidee!
Cheers,
Mich
Michiel Spapé
Research Fellow
Perception & Action group
University of Nottingham
School of Psychology
-----Original Message-----
From: e-p...@googlegroups.com [mailto:e-p...@googlegroups.com] On Behalf Of David McFarlane
Sent: 22 February 2010 18:30
To: e-p...@googlegroups.com
Subject: Re: Randomizing image position in a slide object
or
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-p...@googlegroups.com.
To unsubscribe from this group, send email to e-prime+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.