MATLAB Function Reference | Search  Help Desk |
sqrt | Examples See Also |
B = sqrt(A)
B = sqrt(A)
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.
See sqrtm
for the matrix square root.
sqrt((-2:2)') ans = 0 + 1.4142i 0 + 1.0000i 0 1.0000 1.4142
sqrtm
Matrix square root