Home  >  Article  >  How to type the root number two in matlab

How to type the root number two in matlab

angryTom
angryTomOriginal
2020-03-07 16:29:2114087browse

How to type the root number two in matlab

How to type the root number two in matlab

The root number in matlab is represented by ^, and the expression method of the root number two is: 2 ^0.5 .

If you just want to find the value of root two, you can use the sqrt function: sqrt(2).

Note:

In matlab, the cubic root of a number can be expressed as a^(n). For example, if you want to express 2 under the 3rd root , can be written as 2^(1/3).

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

The domain of the sqrt function includes negative numbers and complex numbers. For negative complex numbers z = u i*w, the complex square root sqrt(z) returns sqrt(r)*(cos(phi/2) 1i*sin(phi /2)), where r = abs(z) is the radius and phi = angle(z) is the phase angle in the closed interval -pi <= phi <= pi.

If you want negative and complex numbers to return an error message instead of returning a complex result, use realsqrt instead.

For more related tutorials, please pay attention to PHP Chinese website!

The above is the detailed content of How to type the root number two in matlab. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn