Best way to use Octave in external application
Francesco Cat
heartcollector87 at gmail.com
Sat Apr 12 07:35:05 CDT 2008
2008/4/12, Doug Stewart <dastew at sympatico.ca>:
> Francesco Cat wrote:
>
> > 2008/4/11, Doug Stewart <dastew at sympatico.ca>:
> >
> >
> > > Francesco Cat wrote:
> > >
> > >
> > >
> > > > Hi all,
> > > > I am planning to create a standalone C++ or Java application. I would
> > > > like to use Octave for various tasks, such as calculus and linear
> > > > system analysis.
> > > > What is the best choice do do this? I have tried using sockets but I
> > > > got nothing working (poor documentation and no examples at all).
> > > >
> > > >
> > > >
> > > >
> > > >
> > > these links might help you get the socket to work. I got it going in c#
> > >
> > >
> http://velveeta.che.wisc.edu/octave/lists/archive//help-octave.2006/msg00992.html
> > >
> > > and
> > >
> > >
> http://velveeta.che.wisc.edu/octave/lists/archive//help-octave.2006/msg00987.html
> > >
> > >
> > >
> > my main problem is getting listen() working on octave 3.0:
> > on octave-forge documentation
> > (http://octave.sourceforge.net/doc/f/listen.html) i can
> see:
> > listen(port,host,host,...)
> > Listen for connections on the given port. [...]
> >
> > while inside octave i get:
> >
> > octave:2> help listen
> > listen(octave_socket,int)
> > See the listen() man
> >
> pages/home/francesco/octave/sockets-1.0.3/i686-pc-linux-gnu-api-v32/sockets.oct
> >
> > and i wasn't able to see the listen() man pages....
> >
> >
> >
>
> here is the Octave results
> octave:1> listen(22000,'192.168.1.100','debug')
> listening on port 22000
> trying to accept
> connected
> server: got connection from 192.168.1.100
> trying to accept
> waiting for command
> received command !!!x after -0us
>
>
> does this help? I was running on one machine on my LAN and my c# was at IP
> address 192.68.1.100
>
> Doug
>
what's your Octave vers and on what OS is it running? i'm under linux,
3.0 vers compiled by sources, and i get this output:
octave:1> pkg load sockets
octave:2> listen(22000,'192.168.1.100','debug')
error: invalid conversion from string to real scalar
error: octave_base_value::int_value (): wrong type argument `sq_string'
panic: Segmentation fault -- stopping myself...
attempting to save variables to `octave-core'...
save to `octave-core' complete
Segmentation fault (core dumped)
and then i'm promped on terminal again. I'll try to get the binary
vers from ubuntu repositories and see what happens
More information about the Help-octave
mailing list