Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Ruby linear equation matrix solver

Post any examples or modules that you want to share here

Ruby linear equation matrix solver

Postby KG_is_back » Thu Aug 14, 2014 1:06 am

The tittle says it all. I've finally got into Ruby and here's one of my first successful attempts to write something useful.
Attachments
RUBY _ matrixSolver.fsm
(1.9 KiB) Downloaded 1037 times
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Ruby linear equation matrix solver

Postby RJHollins » Thu Aug 14, 2014 6:31 am

Looks very usefull KG ...

Question ... how do we use the examples you suppied ?
RJHollins
 
Posts: 1568
Joined: Thu Mar 08, 2012 7:58 pm

Re: Ruby linear equation matrix solver

Postby KG_is_back » Thu Aug 14, 2014 10:09 am

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.
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Ruby linear equation matrix solver

Postby RJHollins » Thu Aug 14, 2014 7:31 pm

ah ... ok.

Thanks KG 8-)
RJHollins
 
Posts: 1568
Joined: Thu Mar 08, 2012 7:58 pm

Re: Ruby linear equation matrix solver

Postby martinvicanek » Mon Aug 18, 2014 6:01 am

Nice one, KG, thanks for sharing! :)
User avatar
martinvicanek
 
Posts: 1319
Joined: Sat Jun 22, 2013 8:28 pm

Re: Ruby linear equation matrix solver

Postby KG_is_back » Mon Aug 18, 2014 11:57 am

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.
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia


Return to User Examples

Who is online

Users browsing this forum: No registered users and 37 guests