Page 1 of 1
Ruby linear equation matrix solver
Posted: Thu Aug 14, 2014 1:06 am
by KG_is_back
The tittle says it all. I've finally got into Ruby and here's one of my first successful attempts to write something useful.
Re: Ruby linear equation matrix solver
Posted: Thu Aug 14, 2014 6:31 am
by RJHollins
Looks very usefull KG ...
Question ... how do we use the examples you suppied ?
Re: Ruby linear equation matrix solver
Posted: Thu Aug 14, 2014 10:09 am
by KG_is_back
the example is there just to show you how the input array is serialized. There are several different ways to do that, so I picked one.
when you what to solve for example:
1x+1y+1z=9
5x+8y+4z=6
8x+4y+6z=1
then for the input array you simply read those equations line by line:
[1, 1, 1, 9, 5, 8, 4, 6, 8, 4, 6, 1]
I believe you notice the pattern.
Re: Ruby linear equation matrix solver
Posted: Thu Aug 14, 2014 7:31 pm
by RJHollins
ah ... ok.
Thanks KG

Re: Ruby linear equation matrix solver
Posted: Mon Aug 18, 2014 6:01 am
by martinvicanek
Nice one, KG, thanks for sharing!

Re: Ruby linear equation matrix solver
Posted: Mon Aug 18, 2014 11:57 am
by KG_is_back
I'm also working on a ruby module, that can split high order IIR into series of biquads. Actually I already have it working last night, but I have to test it first before posting.