I need help with imaginary numbers!
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (1)
Walter Roberson
el 24 de Jun. de 2016
small_imag_count = sum(imag(YourArray(:)) < 1000);
1 comentario
Walter Roberson
el 25 de Jun. de 2016
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.
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!