calling c++ or c from octave?

Sergei Steshenko sergstesh at yahoo.com
Tue Nov 4 12:57:18 CST 2008




--- On Tue, 11/4/08, Francis Poulin <fpoulin at uwaterloo.ca> wrote:

> From: Francis Poulin <fpoulin at uwaterloo.ca>
> Subject: calling c++ or c from octave?
> To: help-octave at cae.wisc.edu
> Date: Tuesday, November 4, 2008, 7:41 AM
> Hello,
> 
> I do research that involves a lot of number crunching.  I
> often write  
> or run codes in fortran/c to produce data that I then
> visualize and  
> analyze using octave.  It's a bit cumbersome at times
> going back and  
> forth and I wonder whether it is possible to do everything
> within  
> octave.
> 
> I have read somewhere that it is possible to call programs
> written in c 
> ++ (or perhaps c?) from octave.  Is that true?  If so where
> can I find  
> a good tutorial on how to do this?  I found one or two on
> the web but  
> when I actually got around to trying it, the codes
> didn't actually  
> compile.  If there is a tutorial that someone could point
> out that  
> would be super. I am willing to learn c++ if I can have the
> easy  
> functionality of octave with the fast number crunching
> ability of a  
> lower level language.
> 
> Cheers,
> Francis
> _______________________________________________
> Help-octave mailing list
> Help-octave at cae.wisc.edu
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave

You may start from here: http://wiki.octave.org/wiki.pl?CodaTutorial .

I am using a different approach - I am writing data in binary format from
"C" using "fwrite" and load the data into 'octave' using 'fopen', 'fread'
in 'octave'. Works like a charm.

Regards,
  Sergei.


      


More information about the Help-octave mailing list