selection of a shape for branching


Author
Message
peter
peter
Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)
Group: Forum Members
Posts: 64, Visits: 210
peter - 12/2/2021
I see you point ,
thank you for all your help 

>(1) The conditions aren't mutually exclusive. For example, if distance is exactly equal to to shape.50pct.heightpx/2, this meets both the first as well as the second condition: 
/ branch = [if (expressions.distance >= shape.25pct.heightpx/2 && expressions.distance <= shape.50pct.heightpx/2) {trial.TL_high}
  else if (expressions.distance >= shape.50pct.heightpx/2 && expressions.distance <= shape.75pct.heightpx/2) {trial.NS}
  else if (expressions.distance >= shape.75pct.heightpx/2 && expressions.distance <= shape.100pct.heightpx/2) {trial.TL_high}
  else {trial.choice}]

Do you have any suggestions as to how to resolve the above issue?
for example can i transform expressions.distance into a screen percentage?
Many thanks
Peter
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 105K
peter - 12/2/2021
peter - 12/2/2021
I see you point ,
thank you for all your help 

>(1) The conditions aren't mutually exclusive. For example, if distance is exactly equal to to shape.50pct.heightpx/2, this meets both the first as well as the second condition: 
/ branch = [if (expressions.distance >= shape.25pct.heightpx/2 && expressions.distance <= shape.50pct.heightpx/2) {trial.TL_high}
  else if (expressions.distance >= shape.50pct.heightpx/2 && expressions.distance <= shape.75pct.heightpx/2) {trial.NS}
  else if (expressions.distance >= shape.75pct.heightpx/2 && expressions.distance <= shape.100pct.heightpx/2) {trial.TL_high}
  else {trial.choice}]

Do you have any suggestions as to how to resolve the above issue?
for example can i transform expressions.distance into a screen percentage?
Many thanks
Peter

> for example can i transform expressions.distance into a screen percentage?

You can, but that obviously does nothing to resolve the issue.

The problem is that you have "is equal to" in both conditions. Just define ranges that are mutually exclusive.

branch = [if (expressions.distance >= shape.25pct.heightpx/2 && expressions.distance < shape.50pct.heightpx/2) {trial.TL_high}
  else if (expressions.distance >= shape.50pct.heightpx/2 && expressions.distance < shape.75pct.heightpx/2) {trial.NS}
  else if (expressions.distance >= shape.75pct.heightpx/2 && expressions.distance <= shape.100pct.heightpx/2) {trial.TL_high}
  else {trial.choice}]

You just need to decide which of the conditions should include the equality case and which shouldn't.

peter
peter
Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)
Group: Forum Members
Posts: 64, Visits: 210
Dave - 12/2/2021
peter - 12/2/2021
peter - 12/2/2021
I see you point ,
thank you for all your help 

>(1) The conditions aren't mutually exclusive. For example, if distance is exactly equal to to shape.50pct.heightpx/2, this meets both the first as well as the second condition: 
/ branch = [if (expressions.distance >= shape.25pct.heightpx/2 && expressions.distance <= shape.50pct.heightpx/2) {trial.TL_high}
  else if (expressions.distance >= shape.50pct.heightpx/2 && expressions.distance <= shape.75pct.heightpx/2) {trial.NS}
  else if (expressions.distance >= shape.75pct.heightpx/2 && expressions.distance <= shape.100pct.heightpx/2) {trial.TL_high}
  else {trial.choice}]

Do you have any suggestions as to how to resolve the above issue?
for example can i transform expressions.distance into a screen percentage?
Many thanks
Peter

> for example can i transform expressions.distance into a screen percentage?

You can, but that obviously does nothing to resolve the issue.

The problem is that you have "is equal to" in both conditions. Just define ranges that are mutually exclusive.

branch = [if (expressions.distance >= shape.25pct.heightpx/2 && expressions.distance < shape.50pct.heightpx/2) {trial.TL_high}
  else if (expressions.distance >= shape.50pct.heightpx/2 && expressions.distance < shape.75pct.heightpx/2) {trial.NS}
  else if (expressions.distance >= shape.75pct.heightpx/2 && expressions.distance <= shape.100pct.heightpx/2) {trial.TL_high}
  else {trial.choice}]

You just need to decide which of the conditions should include the equality case and which shouldn't.

I see well that's nice and simple then
thanks for your help
Peter
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search