simlogo1

 

 

 

SimQuest 6.4 help

 

 

Merge

 

When applied to an array of booleans and two arrays of data, Merge produces an array. If the corresponding component of the boolean is true (T), the value of the result is equal to that of the corresponding component of the first array of data, otherwise, if the component of the Boolean if false (F) the value is drawn from the second array of data.
It has four variables: mask, array1, array2, and result.

 

Examples:

       mask = (T, T), array1 = (3, 9), array2 = (1, 2) => result = (3, 9)

       mask = (F, T, F), array1 = (F, F, F), array2 = (T, T, T) => result = (T, F, T)

 

 

 

Related topics:

 

 

 

Copyright University of Twente 2011