-
Notifications
You must be signed in to change notification settings - Fork 27
Octave vs Matlab
Ido Rosen edited this page Jan 4, 2014
·
1 revision
Octave is a free version of Matlab. However, there are some reasons to prefer Matlab:
- It has much better graphics
- It has a much better IDE (integrated development environment), including an excellent editor, debugger, and profiler
- It is faster than Octave, since it has a just-in-time compiler.
- It has more functions.
- Octave's legend function has a different interface than Matlab's.
- Octave sets random seeds differently than Matlab, hence random data is not consistent.
- Octave does not yet (Fall 2011) support Matlab's Object Oriented System and has only limited support for the old style OO system, (e.g. no operator overloading support).
- Octave does not support the concatenation of a cell array of strings and a string, you must first wrap the string in a cell.
- Vertical concatenation of nested cell arrays of strings, e.g. vertcat(s{:}) behaves differently in Matlab and Octave. Matlab returns a cell array of strings, Octave returns a character array.
- Calling bsxfun(@eq, a(:), sparse(1:n)) fails in Octave, but works if you omit the call to sparse.
- The octave function behaves slightly differently than Matlab's If you call in Octave while in the same directory as , octave returns , whereas Matlab will return the full absolute filepath. This causes problems when calling .
- The following command fails, (does nothing) in Octave: . The problem is the option.
- Here is a list of files in Matlab 2008a, missing in Octave.
- Octave does not yet support Matlab's new Object Oriented System and has only limited support for the old style OO system, (e.g. no operator overloading support). This should have no impact on PMTK3, which no longer uses objects. However, PMTK1 and PMTK2 will not work in Octave, and nor will graphviz4matlab.
- The 'rows' function in Minka's lightspeed toolbox masks the built in Octave 'rows' function, which causes subtle bugs in unexpected places.
- Matlab uses different file extensions for different versions of .mex files, depending on the operating system. Octave does not, so it is difficult to include pre-compiled versions for multiple machines. See this page for more details.
Octave can be launched within the Matlab command window, (useful for development purposes) by using the following code. Add these lines to a Matlab shortcut for single button access.
Type to return to Matlab.
Code in the Matlab editor can be executed in Octave, (while its running) by highlighting it and pressing the key.