I need help with imaginary numbers!
이전 댓글 표시
How can I count the amount of numbers for which and imaginary number is less than lets say 1000.
For example display the number of negative integers for which i^(1.7) is less than 1000. I know this may not be much to go off of but that's all I have and I have no idea how to approach this problem. I'd appreciate any help
채택된 답변
추가 답변 (1개)
Walter Roberson
2016년 6월 24일
small_imag_count = sum(imag(YourArray(:)) < 1000);
댓글 수: 1
Walter Roberson
2016년 6월 25일
You can convert x^y to exponential form. In the particular case of y > 0 and x < 0, it becomes
exp(y*ln(-x))*cos(y*Pi) + 1i * exp(y*ln(-x))*sin(y*Pi)
you can then take the real or imaginary portions, which would be
exp(y*ln(-x))*cos(y*Pi)
or
exp(y*ln(-x))*sin(y*Pi)
for the imaginary part.
You can substitute in the 1.7 for y, and then solve what comes out for equality to 1000. Though if you do that for the imaginary part you will find no solutions -- for negative x, the imaginary part of x^1.7 is negative.
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!