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
|
<HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.51
from ./Octave-FAQ.texi on 9 October 1998 -->
<TITLE>Frequently asked questions about Octave (with answers) - Porting programs from Matlab to Octave</TITLE>
</HEAD>
<BODY>
Go to the <A HREF="Octave-FAQ_1.html">first</A>, <A HREF="Octave-FAQ_9.html">previous</A>, <A HREF="Octave-FAQ_11.html">next</A>, <A HREF="Octave-FAQ_11.html">last</A> section, <A HREF="Octave-FAQ_toc.html">table of contents</A>.
<P><HR><P>
<H1><A NAME="SEC24" HREF="Octave-FAQ_toc.html#TOC24">Porting programs from MATLAB to Octave</A></H1>
<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>
<OL>
<LI>
Irrelevant.
<LI>
Known differences, perhaps configurable with a user preference variable.
<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>
<PRE>
PS1 = ">> "
PS2 = ""
beep_on_error = 1.0
default_eval_print_flag = 0.0
default_save_format = "mat-binary"
define_all_return_values = 1.0
do_fortran_indexing = 1.0
empty_list_elements_ok = 1.0
fixed_point_format = 1.0
implicit_num_to_str_ok = 1.0
implicit_str_to_num_ok = 1.0
ok_to_lose_imaginary_part = 1.0
page_screen_output = 0.0
prefer_column_vectors = 0.0
prefer_zero_one_indexing = 1.0
print_empty_dimensions = 0.0
treat_neg_dim_as_zero = 1.0
warn_function_name_clash = 0.0
whitespace_in_literal_matrix = "traditional"
</PRE>
<P>
Some other known differences are:
</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><HR><P>
Go to the <A HREF="Octave-FAQ_1.html">first</A>, <A HREF="Octave-FAQ_9.html">previous</A>, <A HREF="Octave-FAQ_11.html">next</A>, <A HREF="Octave-FAQ_11.html">last</A> section, <A HREF="Octave-FAQ_toc.html">table of contents</A>.
</BODY>
</HTML>
|