RDocumentation
Moon
Learn R
Search all packages and functions
pracma (version 1.9.9)
hypot: Hypotenuse Function
Description
Square root of sum of squares
Usage
hypot(x, y)
Arguments
x, y
Vectors of real or complex numbers of the same size
Value
Returns a vector or matrix of the same size.
Details
Element-by-element computation of the square root of the sum of squares of vectors resp. matrices
x
and
y
.
Examples
Run this code
hypot(
3
,
4
)
hypot(
c
(
0
,
0
),
c
(
3
,
4
))
Run the code above in your browser using
DataLab