using cosh and inverse cosh in matlab

조회 수: 19 (최근 30일)
mohammed hussein
mohammed hussein 2022년 2월 11일
댓글: Steven Lord 2022년 2월 11일
Hi all
i have problem using cosh and cosh^-1 in matlab . in my program i have to solve complex number using cosh and i have to reused cosh^-1 to get the same number but i couldnt . for example
A=5+5i
B= cosh(A) it gives (21.0506 -71.1553i)
A=acosh(B) it gives (5.0000 - 1.2832i) which is not the same A (5+5i)
how can i solve this problem
thank you

채택된 답변

Steven Lord
Steven Lord 2022년 2월 11일
What problem?
A1 = 5+5i
A1 = 5.0000 + 5.0000i
A2 = acosh(cosh(A1))
A2 = 5.0000 - 1.2832i
(A2-A1)/(2i*pi)
ans = -1
Remember that as stated on Wikipedia "hyperbolic functions are periodic with respect to the imaginary component, with period " So you received a correct answer (if you added one period, , to A2 you get A1 or close enough) even if it wasn't the correct answer you expected.
A1 - (A2 + 2i*pi)
ans = 0
  댓글 수: 2
mohammed hussein
mohammed hussein 2022년 2월 11일
편집: mohammed hussein 2022년 2월 11일
Thank you very much for your answer. The problem is to find the original number after using a hyperbolic function (cosh). Theoretically, when I have the results of (cosh) and I want the original number before (cosh), I used the inverse of cosh (acosh).
As I explain in the example , If I have this complex number A=5+5i and I only have the result of cosh(A) which is (21.0506 -71.1553i). but I want the A (original number) so I normally use the inverse of cosh, A=acosh(B) which is in MATLAB (5.0000 - 1.2832i). the result of MATLAB is a different number than what I used in beginning (A=5+5i).
My question is how can I use the acosh of complex numbers from the result of cosh to find the original number (A) without error especially in the imaginary part . The most important is to find A because i only have results of cosh
Thank you again for your answer
Steven Lord
Steven Lord 2022년 2월 11일
Without more information, you can't.
As a simpler example, I'm thinking of a number that gives the result 4 when squared. What is my number?
You may say that the answer is 2. That is one correct answer. A different correct answer is -2.
It is impossible for you to tell whether the number I was thinking of was 2 or -2.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by