It is often that electrical engineers in order to solve circuits they have to calculate complex numbers, it is fustrating to make all the computations on paper or on your calculator.
These simple functions on python help you a lot with that.
You can use it very easily on the comand line.
- $ cd .\User\Mathematics (Go to directory you want to run the file)
- $ git clone https://github.com/dodosiz/complex_numbers.git (Get the files you need)
- $ python (open interactive python shell)
- $ >>from complex import *
- Use the functions and rock the world :), example:
- $ >>sum_of_polars(2.0, 15.0, 3.0, 30.0)
- (4.958, 24.008)
- $ >>polar2rect(5.0, 45.0)
- (3.53 + 3.53j)
- $>>help()
Have fun and don't forget to follow me on twiter @code4lifeXanthi