Skip to content

RDCH106/linearizator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linearizator

PyPI PyPI PyPI Codacy Badge Build Status

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

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))

About

Small library to solve linearization problems

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages