series_multiply()series_multiply()

计算两个数值序列输入的元素对应乘法。Calculates the element-wise multiplication of two numeric series inputs.

语法Syntax

series_multiply(series1, series2) series_multiply(series1, series2)

参数Arguments

  • series1, series2:输入数值数组,按对应元素相乘获得动态数组结果。series1, series2 : Input numeric arrays, to be element-wise multiplied into a dynamic array result. 所有参数都必须是动态数组。All arguments must be dynamic arrays.

返回Returns

两个输入之间的元素对应乘法运算的计算结果的动态数组。Dynamic array of calculated element-wise multiplication operation between the two inputs. 任何非数值元素或非现有元素(不同大小的数组)都会生成 null 元素值。Any non-numeric element or non-existing element (arrays of different sizes) yields a null element value.

示例Example

range x from 1 to 3 step 1
| extend y = x * 2
| extend z = y * 2
| project s1 = pack_array(x,y,z), s2 = pack_array(z, y, x)
| extend s1_multiply_s2 = series_multiply(s1, s2)
s1s1 s2s2 s1_multiply_s2s1_multiply_s2
[1,2,4][1,2,4] [4,2,1][4,2,1] [4,4,4][4,4,4]
[2,4,8][2,4,8] [8,4,2][8,4,2] [16,16,16][16,16,16]
[3,6,12][3,6,12] [12,6,3][12,6,3] [36,36,36][36,36,36]