Octave versus Matlab
Some small differences exist between Octave and Matlab.
The following list is not meant to be exhaustive, but aims the solve practical problems in conversions
-
Octave uses a single ODE-solver for
x(t): x = lsode("nm",x0,t);
its various algorithms can be set with options.
Matlab has several ODE-solvers, e.g. [t,x] = ode45("nm",t,x0).
Notice that the sequence of indepent and dependent variables in the input is different;
this difference should match that of the user-defined function that specifies the ODE.
Matlab has the independent variable also as output;
this is because if it is a 2-vector in the input, the output has all evaluated in-between-points.
If the input vector has 3 or more elements, the first output is identical to the used input.
-
The output of Octave's root finder
fsolve("name",x0) has an indicator success or failure as second argument, while that of Matlab (with the same name) has this as third output, the second one being the value of the function at the root.
Matlab's root finder (of the optimisation toolbox) has an extremely narrow domain of attraction, compared to that of Octave.
- Unused variables in Octave functions, that are declared global, can have numerical values.
In Matlab they exist, but are empty (0 x 0);
clear does not affect the values of global variables inside
functions