What does 'li' mean?
조회 수: 117 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (3개)
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.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!