hypot
Returns the element-wise square root of the sum of the squares of x and y.
Syntax
R = hypot(x,y)
Inputs
- x,y
- Any valid scalar | vector | matrix.
Outputs
- R
- scalar | vector | matrix
Examples
hypot(-8,4)
R = 8.9443
hypot(7,2-8i)
R = 10.817
hypot(5,[1,6,3;8,-2,3])
R = [ 5.099 7.8102 5.831 ; 9.434 5.3852 5.831 ]
hypot([i,9,2-2i;1+i,4-i,-6],2i-1)
R = [ 2.4495 9.2736 3.6056 ; 2.6458 4.6904 6.4031 ]
Comments
hypot(x,y) = sqrt(x.^2 + y.^2)