Dynamically linked functions
In some situations, you may not be able to avoid heavy looping. For example, you may wish to use a particular numerical differential equation solver which does the job better than Octave's lsode
. First, have a very good argument why lsode
does not fulfil your criterion. Secondly, there already exists a differential equation solver package called odepkg that includes many different solvers. In the situation where you must implement your own function, you can do this in lower level programming languages like C or C++ and then link this to Octave. The linking enables you to use other libraries in your C/C++ code thereby making the possible extensions to Octave almost infinite.
There must be an interface between the lower level code and the Octave interpreter. Octave's native interface is based on C++, but you can also use MATLAB's MEX (MATLAB EXecutable) interface. We shall limit the discussion to the former. As mentioned in the introduction to the chapter, I expect...