sequence generator


Author
Message
soobin
soobin
Partner Member (735 reputation)Partner Member (735 reputation)Partner Member (735 reputation)Partner Member (735 reputation)Partner Member (735 reputation)Partner Member (735 reputation)Partner Member (735 reputation)Partner Member (735 reputation)Partner Member (735 reputation)
Group: Forum Members
Posts: 11, Visits: 30
Good afternoon, I'm soobin.

I have a question.

Do you see the picture? I can't solve the error. What should I do?

My task is 120 test trials (6 categories x 2 formats x 10 repetitions).

I corrected original scripts. I transformed '80' test trials into '120' test trials. I turned '4' categories into '8' categories. 

It is no problem.

I think I should modify below scripts. 


---


/ontrialend = [
if (values.count_comparecat < 6 && values.count_compareformat < 6)
{
values.sequence = concat(values.sequence, values.newnumber);
values.reset = false;
if (values.newnumber == 1)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 2)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 3)
{values.runcount_1 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 4)
{values.runcount_1 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 5)
{values.runcount_2 = 0; values.runcount_1 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 6)
{values.runcount_2 = 0; values.runcount_1 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 7)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_1 = 0; values.runcount_B = 0}
else if (values.newnumber == 8)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_1 = 0; values.runcount_A = 0};
};
 
if (values.count_comparecat > 3 && values.count_compareformat < 4)
{
if (values.newnumber == 1)
{
if (values.count3 !=0 || values.count4 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count3 !=0 || values.count4 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count1 !=0 || values.count2 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count2 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count5 != 0 || values.count6 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count5 != 0 || values.count6 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
};
 
if (values.count_comparecat < 4 && values.count_compareformat > 3)
{
if (values.newnumber == 1)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
};
 
if (values.count_comparecat > 3 && values.count_compareformat > 3)
{
if (values.newnumber == 1)
{
if (values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count2 !=0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count2 !=0 || values.count4 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count3 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
}]
 
/ontrialend = [if (values.reset == true)
{
values.sequence = "";
values.index = 0; values.count_comparecat = 0; values.count_compareformat = 0;
values.runcount_1 = 0; values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0;
values.runcount_A = 0; values.runcount_B = 0;
values.count1 = 10; values.count2 = 10; values.count3 = 10; values.count4 = 10; values.count5 = 10; values.count6 = 10; values.count7 = 10; values.count8 = 10;
list.stimcats.reset()
}]
 
/branch = [if (values.index != values.totaltrialcount) trial.selectnumber]
 
/timeout = 0
/recorddata = false
</trial>



---

It would be really appreciated if you help me.

Thank you for your consideration.




GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
soobin - 8 Years Ago
soobin - 8 Years Ago
Dave - 8 Years Ago
soobin - 8 Years Ago
                     + x [quote] [b] soobin - Monday, July 31, 2017 [/b] +...
Dave - 8 Years Ago
                         + x [quote] [b] Dave - Monday, July 31, 2017 [/b] +...
soobin - 8 Years Ago
                             + x [quote] [b] soobin - Monday, July 31, 2017 [/b]...
Dave - 8 Years Ago
                                 + x [quote] [b] Dave - Monday, July 31, 2017 [/b] +...
soobin - 8 Years Ago
                                     + x [quote] [b] soobin - Monday, July 31, 2017 [/b] +...
Dave - 8 Years Ago
                                         + x [quote] [b] Dave - Monday, July 31, 2017 [/b] +...
soobin - 8 Years Ago
                                             + x [quote] [b] soobin - Tuesday, August 1, 2017 [/b]...
Dave - 8 Years Ago

Reading This Topic

Explore
Messages
Mentions
Search