This shows you the differences between two versions of the page.
howtos:toolcoding:boolean_masks [2009/12/01 16:20] shona.weldon created |
howtos:toolcoding:boolean_masks [2009/12/01 19:14] (current) marcus.williams |
||
---|---|---|---|
Line 2: | Line 2: | ||
Boolean masks are often used to 'filter' the values of arrays, based on some logical criteria (e.g. negative or positive values). Using a mask is a two-step process: | Boolean masks are often used to 'filter' the values of arrays, based on some logical criteria (e.g. negative or positive values). Using a mask is a two-step process: | ||
- | - Creation of the mask using a boolean operator (e.g. greater than, less than or equal to) | + | - Creation of the mask using boolean operator(s) (e.g. greater than, less than or equal to) |
- Application of the mask to some array to be filtered, simply by multiplication. | - Application of the mask to some array to be filtered, simply by multiplication. | ||