Platform | x64, Win32, .NET |
Purpose |
To merge two arrays according to a given mask. |
Class |
Elemental function. |
Syntax |
FUNCTION MERGE(TSOURCE, FSOURCE, MASK) |
Description |
TSOURCE is an array of any type and kind type. FSOURCE and the result have the same type and kind type as TSOURCE. MASK is a logical array that is conformable to TSOURCE, FSOURCE and the result. |
Return value |
For each element, the result is TSOURCE if MASK is true and FSOURCE otherwise. |
Example |
If A = [1, 4, 5], B = [4, 3, 6] then MERGE(A, B, MASK= A < B) gives [1, 3, 5]. |