https://github.com/rdch106/linearizator
Small library to solve linearization problems
https://github.com/rdch106/linearizator
linearization math python
Last synced: 9 months ago
JSON representation
Small library to solve linearization problems
- Host: GitHub
- URL: https://github.com/rdch106/linearizator
- Owner: RDCH106
- License: lgpl-3.0
- Created: 2017-05-29T09:46:11.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-22T19:12:26.000Z (about 8 years ago)
- Last Synced: 2025-05-12T21:09:53.672Z (9 months ago)
- Topics: linearization, math, python
- Language: Python
- Size: 19.5 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Linearizator
[](https://pypi.python.org/pypi/linearizator)
[](https://pypi.python.org/pypi/linearizator)
[](https://github.com/RDCH106/linearizator/blob/master/LICENSE)
[](https://www.codacy.com/app/RDCH106/linearizator?utm_source=github.com&utm_medium=referral&utm_content=RDCH106/linearizator&utm_campaign=badger)
[](https://travis-ci.org/RDCH106/linearizator)
Small library to solve linearization problems.
Linearizator is compatible with Python 2 and Python 3.
### What can I do with Linearizator?
- Solve equation of line using 2 points
- Use solved equation to linearize values
### Installation
You can install or upgrade linearizator with:
`$ pip install linearizator --upgrade`
Or you can install from source with:
```
$ git clone https://github.com/RDCH106/linearizator.git --recursive
$ cd linearizator
$ python setup.py install
```
### Quick example
```python
from linearizator import linearizator
# Initialize linearizator object
lin = linearizator.Linearizator(x1=6.4, y1=20, x2=16.8, y2=85, unknown="y")
# Linearize
lin.linearize()
# Show equation of line
print(lin.pretty_equation())
# Calculate the value of a point
print(lin.calculate(6.4))
# Generate inverse linearization
lin.inverse()
# Show equation of line
print(lin.pretty_equation())
# Calculate the value of a point
print(lin.calculate(20))
```