What does 'li' mean?

145 次查看(过去 30 天)
Mohiedin Bagheri
Mohiedin Bagheri 2021-10-20
编辑: James Tursa 2021-10-20
Hello all,
I have solved an equation in matlab using the following code:
syms x
ththa2 = (2*exp(5*x))/(3*exp(2*x)+1*exp(-2*x))
y = diff(ththa2)
eqn = y == 0
S = solve(eqn)
The answer is
S =
log(-(7^(1/2)*1i)/3)/2
log((7^(1/2)*1i)/3)/2
Would you please tell me what does this '1i' mean in the answer? What kind of a value is this?
Thank you,
Mohi

回答(3 个)

KSSV
KSSV 2021-10-20
编辑:KSSV 2021-10-20
1i stands for complex number. i.e. sqrt(-1).
c=2+3*i
c = 2.0000 + 3.0000i
c=2+3*1i
c = 2.0000 + 3.0000i

Image Analyst
Image Analyst 2021-10-20
It's i, the square root of -1, the imaginary constant.

James Tursa
James Tursa 2021-10-20
编辑:James Tursa 2021-10-20
1i is used to ensure it isn't confused with a variable named i that you might have in the workspace. I.e., 1i is always sqrt(-1), whereas just i might be sqrt(-1) or a variable that you created named i. It is common to see 1i used in MATLAB for sqrt(-1) because it is always unambiguous.

类别

Help CenterFile Exchange 中查找有关 Assumptions 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by