|
FreeMat
|
Section: Mathematical Functions
Computes the square root of the argument matrix. The general syntax for its use is
y = sqrt(x)
where x is an N-dimensional numerical array.
Here are some examples of using sqrt
--> sqrt(9)
ans =
3
--> sqrt(i)
ans =
0.7071 + 0.7071i
--> sqrt(-1)
ans =
0.0000 + 1.0000i
--> x = rand(4)
x =
0.4871 0.5309 0.3343 0.1123
0.7049 0.6431 0.3320 0.7799
0.5845 0.8331 0.9892 0.9155
0.5407 0.9178 0.3408 0.2274
--> sqrt(x)
ans =
0.6980 0.7286 0.5782 0.3352
0.8396 0.8020 0.5762 0.8831
0.7645 0.9127 0.9946 0.9568
0.7354 0.9580 0.5838 0.4769