Calling Octave Functions
Calling Octave Functions
net/publication/290434658
CITATIONS READS
0 5,061
1 author:
Josimar Chire
University of São Paulo
56 PUBLICATIONS 65 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
Quantum Inspired Evolutionary Algorithm for Large Scale Optimization View project
All content following this page was uploaded by Josimar Chire on 14 January 2016.
Abstract
Many experiments are done to test ideas related to engineering, sciences
and most of the people uses Matlab and works on Windows. Octave is a pro-
posal similar to Matlab for Linux, and it does not have a tool for exportation.
Then I was looking for how to call Octave functions from c++ and I want to
share how to do it.
Contents
1 Introduction 2
2 How to 2
3 Results 2
1
Josimar Edinson Chire Saire Learning Everyday
[email protected] January 14, 2016
1 Introduction
Octave is a proposal made for Linux, the syntax is similar to Matlab. Useful to test
ideas with no need to code it in c++, although it is slower than c++, sometimes
functionality is better than performance. If you have used some specific function
from statistics, signal or others libraries you will need time to code or look for this
function in c++ . Therefore, if you can use Octave functions in your c++ code it
will save time.
2 How to
If you want to try you can install Octave from terminal:
3 Results
I tried with example from Octave:
#include <iostream>
#include <octave/oct.h>
#include <octave/octave.h>
#include <octave/parse.h>
#include <octave/toplev.h>
2
Josimar Edinson Chire Saire Learning Everyday
[email protected] January 14, 2016
argv(0) = "embedded";
argv(1) = "-q";
octave_idx_type n = 2;
octave_value_list in;
clean_up_and_exit (0);
}
These warnings are for some troubles with octave libraries that I had. I solved
it reinstalling Octave.
But I wanted to use some functionality from c++11 and It worked:
#include <iostream>
#include <octave/oct.h>
#include <octave/octave.h>
#include <octave/parse.h>
#include <octave/toplev.h>
3
Josimar Edinson Chire Saire Learning Everyday
[email protected] January 14, 2016
#include <random>
octave_idx_type n = 2;
octave_value_list in;
clean_up_and_exit (0);
}