## Creating list or vector with numerical values & getting n-th element out of this list

##### Creating list or vector with numerical values & getting n-th...
 Author Message Dave posted 10 Years Ago ANSWER Group: Administrators Posts: 12K, Visits: 100K Assuming you did something like/ getlossdeck1 = sequence(0, 0, 0, 0, 0, 0, 0, 0, 0, 1250)/ getlossdeck2 = sequence(0, 0, 0, 0, 0, 150, 200, 250, 300, 350)/ getlossdeck3 = sequence(0, 0, 0, 0, 0, 0, 50, 50, 50, 50)/ getlossdeck4 = sequence(0, 0, 0, 0, 0, 0, 0, 0, 0, 250)there is no reason why the decks should be "in sync". If e.g. "deck 1" is selected.../ ontrialend = [ if (trial.igt.response == "deck1") {... ; values.loss=expressions.getlossdeck1; ...}]...A single sample is retrieved from expressions.getlossdeck1. The remaining expressions are (supposed to be) wholly unaffected -- no samples are retrieved.The quickest, but somewhat hack-ish, way to change that is to retrieve a sample from *every* expression regardless of the deck chosen:.../ ontrialend = [ if (trial.igt.response == "deck1") {... ; values.loss=expressions.getlossdeck1; expressions.getlossdeck2; expressions.getlossdeck3; expressions.getlossdeck4;...}]/ ontrialend = [ if (trial.igt.response == "deck2") {... ; values.loss=expressions.getlossdeck2; expressions.getlossdeck1; expressions.getlossdeck3; expressions.getlossdeck4;...}]... fasteddie9141 Group: Forum Members Posts: 2, Visits: 32 Thanks for this I will give it a hack so to speak Apologies for doubling up with PM Dave posted 10 Years Ago ANSWER Group: Administrators Posts: 12K, Visits: 100K No problem. Let me know how it goes!

#### Merge Selected

Merge into selected topic...

Merge into merge target...

Merge into a specific topic ID...

#### Login

 Login Remember Me Reset Password Resend Validation Email