|
MERGEName:
Note that any value of TAG less than or equal to 0 will be treated as a 0 and any value of TAG that is greater than 0 will be treated as a 1. There is an alternate version of this command (see Syntax 2) that selects one of three values depending on whether the value of TAG is negative, zero, or positive.
<SUBSET/EXCEPT/FOR qualification> where <y1> is a variable or a parameter; <y2> is a variable or a parameter; <tag> is a variable or a parameter; <y> is a variable or a parameter (depending on what <y1>, <y2>, and <tag> are) where the computed merged values are stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional.
<SUBSET/EXCEPT/FOR qualification> where <y1> is a variable or a parameter; <y2> is a variable or a parameter; <y3> is a variable or a parameter; <tag> is a variable or a parameter; <y> is a variable or a parameter (depending on what <y1>, <y2>, <y3>, and <tag> are) where the computed merged values are stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional.
LET A = MERGE(14,10,0) LET A = MERGE(A1,A2,TAG) LET X2 = MERGE(X1,X4,TAG) LET Y = MERGE3(X1,X2,X3,TAG)
let y1 = sequence 1 1 20 let y2 = sequence -1 -1 -20 let y3 = 0 for i = 1 1 20 let tag = sequence 0 1 1 for i = 1 1 20 let tag2 = sequence -1 1 1 for i = 1 1 20 . let yout = merge(y1,y2,tag) set write decimals 1 print youtThe following output is printed: --------------- YOUT --------------- 1.0 -2.0 3.0 -4.0 5.0 -6.0 7.0 -8.0 9.0 -10.0 11.0 -12.0 13.0 -14.0 15.0 -16.0 17.0 -18.0 19.0 -20.0 let yout = merge3(y1,y2,y3,tag2) set write decimals 1 print youtThe following output is printed: --------------- YOUT --------------- 1.0 -2.0 0.0 4.0 -5.0 0.0 7.0 -8.0 0.0 10.0 -11.0 0.0 13.0 -14.0 0.0 16.0 -17.0 0.0 19.0 -20.0
Date created: 01/06/2011 |