Reciprocal square root
Y = rsqrt(X)
example
Y = rsqrt(X) returns the reciprocal square root of each element of the half-precision input array, X.
Y
X
Note
This function supports only half-precision inputs.
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 array, specified as a half-precision numeric scalar, vector, matrix, or multidimensional array
Data Types: Half
Half
half
You have a modified version of this example. Do you want to open this example with your edits?