Frequently asked questions about Octave (with answers): MATLAB compatibility

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

# 10. Porting programs from MATLAB to Octave

"I wrote some code for MATLAB, and I want to get it running under Octave. Is there anything I should watch out for?"

The differences between Octave and MATLAB typically fall into one of three categories:

1. Irrelevant.

2. Known differences, perhaps configurable with a user preference variable.

3. Unknown differences.

The first category, irrelevant differences, do not affect computations and most likely do not affect the execution of function files.

The differences of the second category are usually because the authors of Octave decided on a better (subjective) implementation that the way MATLAB does it, and so introduced "user preference variables" so that you can customize Octave's behavior to be either MATLAB-compatible or to use Octave's new features. To make Octave more MATLAB-compatible, put the following statements in your ``~/.octaverc`' file, or use the command line option ``--traditional`', which implies all of these settings. Note that this list may not be complete, because some new variables may have been introduced since this document was last updated.

      PS1                           = ">> "
      PS2                           = ""
      beep_on_error                 = true
      crash_dumps_octave_core       = false
      default_save_format           = "mat-binary"
      fixed_point_format            = true
      page_screen_output            = false
      print_empty_dimensions        = false
      warn_function_name_clash      = false

Some other known differences are:

- The Octave plotting functions are mostly compatible with the ones from MATLAB 3.x, but not from MATLAB 4.x.

The third category of differences is (hopefully) shrinking. If you find a difference between Octave behavior and MATLAB, then you should send a description of this difference (with code illustrating the difference, if possible) to bug-octave@bevo.che.wisc.edu.

An archive of old postings to the Octave mailing lists is maintained on ftp.che.wisc.edu in the directory ``/pub/octave/MAILING-LISTS`'.

[ << ] | [ >> ] |  |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

This document was generated by John W. Eaton on January, 20 2004 using texi2html