Skip to content

General solutions to systems of nonhomogeneous linear equations, Ax=b

Notifications You must be signed in to change notification settings

wangmengchang/general_solutions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

General Solutions

General solutions to nonhomogeneous linear equations Ax = b.

Any solution to Ax=b can be expressed as the sum of a special solution to Ax=b, plus a solution to Ax=0.

import numpy as np
from general_solutions import gsolve, gss_usage
...
gss_usage()            # show the usage in detail
...
x,B,n = gsolve(A,b)    # get a special solution, a matrix of bases, the nullity of A
...
x1 = x + B.dot(v)      # get a new solution with a vector with length n 
...

Install

python -m pip install general_solutions