Summary

In this chapter we learned:

  • About tic and toc.
  • How you can optimize your Octave code.
  • To use the function macro DEFUN_DLD.
  • About the most common high-level classes in the Octave C++ library like Matrix, ColumnVector, and SparseMatrix.
  • To use the feval C++ function in order to call user-supplied functions.
  • How to access global variables (defined in the Octave work space) inside your C++ function.
  • That you should use the C++ functionality that comes with the library, that is, you should also vectorize your C++ code.
  • How you can optimize your C++ code by accessing the data stored in the classes directly.

This chapter concludes the book. The book is meant to give you an introduction to Octave and you should now be able to move on and exploit the more ...

Get GNU Octave now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.