gtsam/cmake/example_project
Varun Agrawal 60b874b997 README for compiling and using the example_project 2019-05-17 18:38:15 -04:00
..
example added required includes to fix compilation of matlab wrapper example 2019-05-17 12:15:10 -04:00
tests Better and up-to-date example project 2014-05-06 19:05:59 -07:00
CMakeLists.txt change example_project .so file from STATIC to SHARED, and install library to /lib in install path 2019-05-17 18:29:51 -04:00
README.md README for compiling and using the example_project 2019-05-17 18:38:15 -04:00
SayGoodbye.cpp Better and up-to-date example project 2014-05-06 19:05:59 -07:00
SayHello.cpp Better and up-to-date example project 2014-05-06 19:05:59 -07:00
example.h added default constructor for PrintExamples 2019-05-17 18:30:19 -04:00

README.md

MATLAB Wrapper Example Project

This project serves as a lightweight example for demonstrating how to wrap C++ code in MATLAB using GTSAM.

Compiling

We follow the regular build procedure inside the example_project directory:

mkdir build && cd build
cmake ..
make -j8
sudo make install

sudo ldconfig  # ensures the shared object file generated is correctly loaded

Usage

Now you can open MATLAB and add the gtsam_toolbox to the MATLAB path

addpath('/usr/local/gtsam_toolbox')

At this point you are ready to run the example project. Starting from the example_project directory inside MATLAB, simply run code like regular MATLAB, e.g.

pe = example.PrintExamples();
pe.sayHello();
pe.sayGoodbye();