1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html40/loose.dtd">
<HTML>
<!-- Created on January, 20 2004 by texi2html 1.66 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Many creative people <dev@texi2html.cvshome.org>
Send bugs and suggestions to <users@texi2html.cvshome.org>
-->
<HEAD>
<TITLE>Frequently asked questions about Octave (with answers): MATLAB compatibility</TITLE>
<META NAME="description" CONTENT="Frequently asked questions about Octave (with answers): MATLAB compatibility">
<META NAME="keywords" CONTENT="Frequently asked questions about Octave (with answers): MATLAB compatibility">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.66">
</HEAD>
<BODY LANG="en" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<A NAME="SEC25"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Octave-FAQ_10.html#SEC24"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Octave-FAQ_12.html#SEC26"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Octave-FAQ_10.html#SEC24"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Octave-FAQ.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Octave-FAQ_12.html#SEC26"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Octave-FAQ.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Octave-FAQ_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Octave-FAQ_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1> 10. Porting programs from MATLAB to Octave </H1>
<!--docid::SEC25::-->
<P>
<A NAME="IDX53"></A>
<A NAME="IDX54"></A>
</P>
<P>
"I wrote some code for MATLAB, and I want to get it running under
Octave. Is there anything I should watch out for?"
</P>
<P>
The differences between Octave and MATLAB typically fall into one of
three categories:
</P>
<P>
<OL>
<LI>
Irrelevant.
<P>
</P>
<LI>
Known differences, perhaps configurable with a user preference variable.
<P>
</P>
<LI>
Unknown differences.
</OL>
<P>
The first category, irrelevant differences, do not affect computations
and most likely do not affect the execution of function files.
</P>
<P>
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 `<TT>~/.octaverc</TT>' file, or use the
command line option `<SAMP>--traditional</SAMP>', 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.
</P>
<P>
<TABLE><tr><td> </td><td class=example><pre> 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
</pre></td></tr></table><P>
Some other known differences are:
</P>
<P>
<UL>
<LI>
The Octave plotting functions are mostly compatible with the ones from
MATLAB 3.x, but not from MATLAB 4.x.
</UL>
<P>
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.
</P>
<P>
An archive of old postings to the Octave mailing lists is maintained
on ftp.che.wisc.edu in the directory `<TT>/pub/octave/MAILING-LISTS</TT>'.
</P>
<P>
<A NAME="Index"></A>
<HR SIZE="6">
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Octave-FAQ_10.html#SEC24"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Octave-FAQ_12.html#SEC26"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Octave-FAQ.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Octave-FAQ_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Octave-FAQ_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>
<FONT SIZE="-1">
This document was generated
by <I>John W. Eaton</I> on <I>January, 20 2004</I>
using <A HREF="http://texi2html.cvshome.org"><I>texi2html</I></A>
</FONT>
</BODY>
</HTML>
|