Solving a linear equation

后端 未结 10 1851
悲哀的现实
悲哀的现实 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:17

    Personally, I'm partial to the algorithms of Numerical Recipes. (I'm fond of the C++ edition.)

    This book will teach you why the algorithms work, plus show you some pretty-well debugged implementations of those algorithms.

    Of course, you could just blindly use CLAPACK (I've used it with great success), but I would first hand-type a Gaussian Elimination algorithm to at least have a faint idea of the kind of work that has gone into making these algorithms stable.

    Later, if you're doing more interesting linear algebra, looking around the source code of Octave will answer a lot of questions.

提交回复
热议问题