Clone this repository to your project directory.
Run pip install -r requirements.txt
to install dependencies.
example:
import sem2.NA_Matrix as nam
print(help(nam)) # Module Help
print(help(nam.jacobi)) # function help
Run the LA_main.py file in the Module
windows:
python sem2\LA_main.py
linux:
python3 sem2/LA_main.py
import:
import sem2.NA_Matrix as nam
The NA_Matrix submodule in the module contains Jacobi and Gauss seidel iteration methods majorly.
Everything here is a numpy array, so be sure to input the proper type if you do not want errors.
You can check the documentation by using help(NA_Matrix)
.
import:
import sem2.NA_Polynomial as nap
bisection, newtonRapson, fixed_point, secant -> all of them use the inbuilt functions of the python. example:
def f(x):
return x**2 -1
or you could use lambda's:
f = lambda x: x**2 -1
The Interpolation functions, simple_interpolation, newton_interpolation, newton_error, legrange_interpolation use sympy functions.
example of making sympy functions:
import sympy
x = sympy.symbols('x')
f = x**2 - 1
# You can pass this function in the required places.
# There are also other inbuilt functions in sympy.
g = sympy.sin(x)
h = sympy.exp(x)
import
import sem2.NA_Integration as nai
trapezoidal_rule, trapezoidal_error, simpson_rule, simpson_error are the functions present here. The same sympy functions are used here.
Yelisetty Karthikeya S M (A.K.A. Lurkingryuu)
contact: Gmail