Programming random digits
Posted on 2003-12-02
I am a beginner to programming languages and need to program a stimulus for a psychology experiment and as yet haven't worked out the precise coding. The programme consists of single digits from 1-9 that must appear randomly on the screen at 200ms time latencies. The subject is requird to press a button when he/she sees a chain of three odd or three even numbers. otherwise there is no button response.
I have tried doing this by creating a loop and by defining the variables specifically as 'odd' or 'even'. But I can't get Delphi to make them appear as I want. The difficulty is also that I want Delphi to record those trials with 3 odd/even digitd in a row and also record the number of correct responses from the subjects.
Unfortunatly in our lab we have relied heavily on matlab in the past and none of us has in-depth knowledge of Delphi. I would be most grateful if you can help me in anyway or set me on the right track. Maybe such a programme is not even possible in Delphi, in which case I will have to search for another programming language.
Any help will be much appreciated in the form of an acknwoledgement.