[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Techniques in using liboctave and liboctinterp from C++ program
From: |
John Swensen |
Subject: |
Techniques in using liboctave and liboctinterp from C++ program |
Date: |
Thu, 26 Jun 2008 11:30:39 -0400 |
I have started using the datatypes and operations of Octave from C++
for my research and have a few questions.
1) Can builtin functions and DLD-FUNCTIONS (e.g. find, eig, conv2,
etc) be used directly from C++?
2) In the documentation, is there a list of overloaded operators for
octave_value objects of different types? For example, I was trying to
do the following:
Matrix A(768,1024);
Matrix B(1,1);
Matric C = A*B;
This, however, didn't work. Instead, I had to declare B as a scalar
double as follows:
Matrix A(768,1024);
double b;
Matrix C = A*B;
This isn't necessarily a problem, but it would be nice if there was a
list of possible overloads somewhere.
3) I often do image thresholding after I have processed it a bit. In
the Octave interpreter I can simply type 'im2 = im1>0.5'. I tried
doing the following, but it didn't work:
Matrix A(768,1024);
double B = 0.5;
Matrix C = A>B;
If I could find out where that bit of the interpreter was implemented,
I could figure it out, but I searched through the sources a bit and
couldn't find anything.
John Swensen
- Techniques in using liboctave and liboctinterp from C++ program,
John Swensen <=