Code integration MATLAB and Ruby

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

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.

···

On 22 Aug 2009, at 18:50, Djoudjou wrote:

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?

--
Regards,

Dirkjan Bussink

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

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

···

On Sat, Aug 22, 2009 at 12:50 PM, Djoudjou<julien.bieren@gmail.com> wrote:

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.

Gregory Brown wrote:

···

On Sat, Aug 22, 2009 at 12:50 PM, Djoudjou<julien.bieren@gmail.com> > wrote:

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.

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.

--
Posted via http://www.ruby-forum.com/\.

Great opportunity to utilize JRuby to avoid all library/gcc/extension
nonsense :slight_smile:

- Charlie

···

On Sat, Aug 22, 2009 at 4:17 PM, Gregory Brown<gregory.t.brown@gmail.com> wrote:

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

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

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

···

On Mon, Aug 24, 2009 at 8:41 PM, Adam West<jicuss@gmail.com> wrote:

Gregory Brown wrote:

On Sat, Aug 22, 2009 at 12:50 PM, Djoudjou<julien.bieren@gmail.com> >> wrote:

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.

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.

Charles Oliver Nutter wrote:

···

On Sat, Aug 22, 2009 at 4:17 PM, Gregory Brown<gregory.t.brown@gmail.com> wrote:

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

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

Great opportunity to utilize JRuby to avoid all library/gcc/extension
nonsense :slight_smile:

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

--
       vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

Gregory Brown wrote:

···

On Mon, Aug 24, 2009 at 8:41 PM, Adam West<jicuss@gmail.com> wrote:

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.

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.
--
Posted via http://www.ruby-forum.com/\.

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

···

On Thu, Sep 3, 2009 at 2:25 PM, Joel VanderWerf<vjoel@path.berkeley.edu> wrote:

Charles Oliver Nutter wrote:

On Sat, Aug 22, 2009 at 4:17 PM, Gregory Brown<gregory.t.brown@gmail.com> >> wrote:

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

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

Great opportunity to utilize JRuby to avoid all library/gcc/extension
nonsense :slight_smile:

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

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

-greg

···

On Thu, Sep 3, 2009 at 5:29 PM, Charles Oliver Nutter<headius@headius.com> wrote:

On Thu, Sep 3, 2009 at 2:25 PM, Joel VanderWerf<vjoel@path.berkeley.edu> wrote:

Charles Oliver Nutter wrote:

On Sat, Aug 22, 2009 at 4:17 PM, Gregory Brown<gregory.t.brown@gmail.com> >>> wrote:

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

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

Great opportunity to utilize JRuby to avoid all library/gcc/extension
nonsense :slight_smile:

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".