Code integration MATLAB and Ruby

D

Djoudjou

Hi,

I'd like to integrate an optimization module coded in Matlab into a
Ruby-based architecture. Basically the matlab code is performing a
genetic algorithm. In matlab i use this code to find a sub matrix with
minimum sum. I'd like to call these functions via Ruby.

Any ideas how this could done?

Thanks a lot.

julien
 
D

Dirkjan Bussink

I'd like to integrate an optimization module coded in Matlab into a
Ruby-based architecture. Basically the matlab code is performing a
genetic algorithm. In matlab i use this code to find a sub matrix with
minimum sum. I'd like to call these functions via Ruby.

Any ideas how this could done?

Your best bet is probably to use Matlab's Java integration and then
use JRuby. I've used the Matlab Java integration in the past, wasn't
really much fun, but got it working in the end.
 
A

Adam West

Gregory said:
Haven't had a chance to play with it but:

http://matlab-ruby.rubyforge.org/matlab-ruby/

Hi, I have gotten to play with matlab-ruby. I found it to be great, once
you get it setup. Getting it to compile in windows was a loosing battle,
once I switched to umbuntu the problems went away. There were a few
oddities with regard to the outputs, but nothing that a quick monkey
patch cant solve. let me know how it works for you, Matlab and Ruby are
my favorite two flavors of code.
 
G

Gregory Brown

Hi, I have gotten to play with matlab-ruby. I found it to be great, once
you get it setup. Getting it to compile in windows was a loosing battle,
once I switched to umbuntu the problems went away. There were a few
oddities with regard to the outputs, but nothing that a quick monkey
patch cant solve. let me know how it works for you, Matlab and Ruby are
my favorite two flavors of code.

Very interesting. My girlfriend does a lot of statistical analysis
and data processing as part of her research, so she spends a lot of
her time in Matlab. I wonder if this compiles on OS X...

-greg
 
A

Adam West

Gregory said:
Very interesting. My girlfriend does a lot of statistical analysis
and data processing as part of her research, so she spends a lot of
her time in Matlab. I wonder if this compiles on OS X...

-greg

It absolutely does. Make sure you have your development environment
setup to compile with gcc or similar. As far as I understand OSX is a
fully functional linux like environment. Matlab is such a wonderful tool
for science or any field which requires massive number cruntching. The
speed of matrix operations simply cannot be beat. Combine this with a
Rails database frontend and your in business.
 
J

Joel VanderWerf

Charles said:
Great opportunity to utilize JRuby to avoid all library/gcc/extension
nonsense :)

Can you elaborate a bit? Do you mean that JRuby code talks to a java api
of matlab or something else?
 
C

Charles Oliver Nutter

Can you elaborate a bit? Do you mean that JRuby code talks to a java api of
matlab or something else?

Dirkjan Bussink mentioned that Matlab comes with Java integration, and
where there's Java integration there's an opportunity for JRuby to
"just work".

- Charlie
 
G

Gregory Brown

Dirkjan Bussink mentioned that Matlab comes with Java integration, and
where there's Java integration there's an opportunity for JRuby to
"just work".

Assuming you get said Java integration to work first. I very well may
try that out, though.

-greg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top