|
PERCDIFName:
Dataplot also supports the alternative formula
where <y1> is a variable or a parameter; <y2> is a variable or a parameter; <y> is a variable or a parameter (depending on what <y1> and <y2> are) where the computed percent difference values are stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This syntax implements the first formula given above (the denominator is the maximum of the two values).
where <y1> is a variable or a parameter; <y2> is a variable or a parameter; <y> is a variable or a parameter (depending on what <y1> and <y2> are) where the computed percent difference values are stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This syntax implements the second formula given above (the denominator is the average of the two values).
LET A = PERCDIF(A1,A2) LET X2 = PERCDIF(X1,X4) LET X2 = PERCDIF(X1-4,X2+6)
LET X = SEQUENCE 0.1 0.1 3 LET Y1 = X**2 LET Y2 = X**(1/2) LET Y3 = PERCDIF(Y1,Y2) SET WRITE DECIMALS 5 PRINT Y1 Y2 Y3The following output is generated: --------------------------------------------- Y1 Y2 Y3 --------------------------------------------- 0.01000 0.31622 96.83772 0.04000 0.44721 91.05572 0.09000 0.54772 83.56832 0.16000 0.63245 74.70177 0.25000 0.70710 64.64466 0.36000 0.77459 53.52419 0.49000 0.83666 41.43379 0.64000 0.89442 28.44582 0.81000 0.94868 14.61850 1.00000 1.00000 0.00000 1.21000 1.04880 13.32158 1.44000 1.09544 23.92742 1.69000 1.14017 32.53399 1.96000 1.18321 39.63183 2.25000 1.22474 45.56689 2.56000 1.26491 50.58941 2.89000 1.30384 54.88441 3.24000 1.34164 58.59133 3.61000 1.37840 61.81703 4.00000 1.41421 64.64466 4.41000 1.44913 67.13973 4.84000 1.48323 69.35455 5.29000 1.51657 71.33128 5.76000 1.54919 73.10428 6.25000 1.58113 74.70177 6.76000 1.61245 76.14716 7.29000 1.64316 77.45997 7.84000 1.67332 78.65663 8.41000 1.70293 79.75102
Date created: 01/06/2011 |