series_magnitude()

Learn how to use the series_magnitude() function to calculate the magnitude of series elements.

Calculates the magnitude of series elements. This is equivalent to the square root of the dot product of the series with itself.

Syntax

series_magnitude(series)

Parameters

NameTypeRequiredDescription
seriesdynamic✔️Array of numeric values.

Returns

Returns a double type value representing the magnitude of the series.

Example

print arr=dynamic([1,2,3,4]) 
| extend series_magnitude=series_magnitude(arr)

Output

s1s2series_magnitude
[1,2,3,4]5.4772255750516612