/MatlabPlotter

A simple C++ class that writes Matlab .m programs as output of calculations e.g. using Eigen3

Primary LanguageMATLABMIT LicenseMIT

MatlabPlotter

Build Status

A simple C++ class that writes Matlab .m programs as output of calculations e.g. using the Eigen C++ library.

This may be useful if you do not want to add additional dependencies to your program or write the plotting code by yourself, but you know that all involved parties have Matlab installed on their computers.

Note: Due to the use of templates, any container type (e.g. vector, array,...) of any library can be used as input vector for plot() and print_row_vector(), as long as the container supports the standard methods size() and operator[](), and the embedded scalar type can be printed by cout << and is suitable for plotting in Matlab.

Current version v0.5 (2015-11-29). See changelog for details. Feedback welcome.

Usage

Include matlab_plotter.h into your C++ program. It needs the standard library of C++11. Use methods as shown in the examples natcsi.cpp (folder) and legendre.cpp (folder).

Note: the examples need Eigen to be installed on your system. You may use cmake for building. However, the plotter can be used independently of it.

License

Copyright (c) 2015 Pirmin Schmid, MIT license.