Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

realsqrt

Square root for nonnegative real arrays

Syntax

Y = realsqrt(X)

Description

Y = realsqrt(X) returns the square root of each element of array X. Array X must contain only nonnegative real numbers. The size of Y is the same as the size of X.

Examples

collapse all

Create a 4-by-4 matrix of real, positive values.

X = magic(4)
X =

    16     2     3    13
     5    11    10     8
     9     7     6    12
     4    14    15     1

Compute the square root of each element in X.

Y = realsqrt(X)
Y =

    4.0000    1.4142    1.7321    3.6056
    2.2361    3.3166    3.1623    2.8284
    3.0000    2.6458    2.4495    3.4641
    2.0000    3.7417    3.8730    1.0000

More About

collapse all

Tall Array Support

This function fully supports tall arrays. For more information, see Tall Arrays.

See Also

| | |

Introduced before R2006a

Was this topic helpful?