我们为许可用户提供了部分翻译好的中文文档。您只需登录便可查阅这些文档

sqrt

Square root

Syntax

B = sqrt(X)

Description

B = sqrt(X) returns the square root of each element of the array X. For the elements of X that are negative or complex, sqrt(X) produces complex results.

Examples

sqrt((-2:2)')
ans =
      0 + 1.4142i
      0 + 1.0000i
      0
 1.0000
 1.4142

More About

expand all

Tips

See sqrtm for the matrix square root.

See Also

| |

Was this topic helpful?