Main Content

rsqrt

Reciprocal square root

Description

example

Y = rsqrt(X) returns the reciprocal square root of each element of the half-precision input array, X.

Note

This function supports only half-precision inputs.

Examples

collapse all

Create a matrix of half-precision values.

X = half(magic(3))
X = 

  3x3 half matrix

     8     1     6
     3     5     7
     4     9     2

Compute the reciprocal square root of each element of X.

y = rsqrt(X)
y = 

  3x3 half matrix

    0.3535    1.0000    0.4082
    0.5771    0.4473    0.3779
    0.5000    0.3333    0.7070

Input Arguments

collapse all

Input array, specified as a half-precision numeric scalar, vector, matrix, or multidimensional array

Data Types: Half

See Also

Introduced in R2018b