Solving a linear equation

后端 未结 10 1854
悲哀的现实
悲哀的现实 2020-11-27 06:47

I need to programmatically solve a system of linear equations in C, Objective C, or (if needed) C++.

Here\'s an example of the equations:

-44.3940 =          


        
10条回答
  •  我在风中等你
    2020-11-27 07:16

    Cramer's Rule and Gaussian Elimination are two good, general-purpose algorithms (also see Simultaneous Linear Equations). If you're looking for code, check out GiNaC, Maxima, and SymbolicC++ (depending on your licensing requirements, of course).

    EDIT: I know you're working in C land, but I also have to put in a good word for SymPy (a computer algebra system in Python). You can learn a lot from its algorithms (if you can read a bit of python). Also, it's under the new BSD license, while most of the free math packages are GPL.

提交回复
热议问题