KBH
Posts:
198
Registered:
3/14/10


Re: Three Equations with Three Unknowns
Posted:
Jul 26, 2013 11:06 PM


Waldek Hebisch wrote:
Your code is badly written. First, it is way too long. Second, variables have meaningless names. Why you limit yourself to 3 by 3 systems, code for n by n system is not harder to write. Do you know about arrays in programming languages? If you really want code limited to 3 x 3 system, then it may be hard to find. OTOH code for n x n systems is easy to find. If you want Pascal code, there are "Numerical Recipes in Pascal" with code that used to be freely available on the net.
KBH writes:
The code began as a parabolic curve fit program and that's why it's for 3 x 3 linear equations. However, the 3 x 3 program allows more view of the math operations and less view of a complex program structure. Then understanding the math operations would allow a more complex program for n x n systems to be written.
Much of the length of the program is the data input. It's a functioning program but not a fully developed program with looping input.
The present post just added some detail that was missed when converting the code from curve fit to solution of 3 x 3 linear equations.
The newsgroup has readers and the code is presented at an easy to understand level.

