TD_DFFT2 Function Example | Teradata Vantage - TD_DFFT2 Example - Teradata Vantage

Database Unbounded Array Framework Time Series Functions

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-10-04
dita:mapPath
ncd1634149624743.ditamap
dita:ditavalPath
ruu1634160136230.ditaval
dita:id
ncd1634149624743

TD_DFFT2 Input (DFFT2_TestMatrix16)

ROW_I COLUMN_I BuoyID Magnitude
0 0 33 1.0000
0 1 33 5.0000
0 2 33 9.0000
0 3 33 13.0000
1 0 33 2.0000
1 1 33 6.0000
1 2 33 10.0000
1 3 33 14.0000
2 0 33 3.0000
2 1 33 7.0000
2 2 33 11.0000
2 3 33 15.0000
3 0 33 4.0000
3 1 33 8.0000
3 2 33 12.0000
3 3 33 16.0000

Example: TD_DFFT2 Call Using K_Integral

EXECUTE FUNCTION INTO VOLATILE ART(DFFT2Res)
TD_DFFT2(
   MATRIX_SPEC(TABLE_NAME(DFFT2_TestMatrix16),
   MATRIX_ID(BuoyID),
   ROW_AXIS(SEQUENCE(ROW_I)), 
   COLUMN_AXIS(SEQUENCE(COLUMN_I)),
   PAYLOAD( FIELDS(MAGNITUDE), CONTENT(REAL))),
   FUNC_PARAMS(FREQ_STYLE(K_INTEGRAL), HUMAN_READABLE(0)),
   OUTPUT_FMT(CONTENT(COMPLEX))
);

TD_DFFT2 Output

Display the primary RETURNS TABLE with this statement:

SELECT * FROM DFFT2Res
BuoyID ROW_I COLUMN_I REAL_MAGNITUDE IMAG_MAGNITUDE
----------------------------------------------------
33     0    0         136.00000       0.0000
33     0    1         -32.00000       32.0000
33     0    2         -32.00000       0.00000
33     0    3         -32.00000       -32.0000
33     1    0         -8.0000         8.0000
33     1    1         0.0000          0.0000
33     1    2         0.0000          0.0000
33     1    3         0.0000          0.0000
33     2    0         -8.0000         0.0000
33     2    1         0.0000          0.0000
33     2    2         0.0000          0.0000
33     2    3         0.0000          0.0000
33     3    0         -8.0000         -8.0000
33     3    1         0.0000          0.0000
33     3    2         0.0000          0.0000
33     3    3         0.0000          0.0000