annotate NEWS-3.html @ 94:e8fc61e077fc

Merged closed branch "kai" into default.
author Kai T. Ohlhus <k.ohlhus@gmail.com>
date Tue, 01 Nov 2016 01:06:10 +0100
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
94
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
1 <!doctype html public "-//IETF//DTD HTML Strict//EN">
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
2 <html>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
3 <head>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
4 <title>Notable Changes in Octave version 3</title>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
5 <link rel="stylesheet" type="text/css" href="octave.css" />
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
6 </head>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
7
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
8 <body>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
9 <div id="title"><h1>News for Octave Version 3</h1></div>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
10
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
11 <ul>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
12 <li>Compatibility with Matlab graphics is much better. We now
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
13 have some graphics features that work like Matlab's Handle
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
14 Graphics (tm):
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
15 <ul>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
16 <li> You can make a subplot and then use the print function to
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
17 generate file with the plot.</li>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
18
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
19 <li> RGB line colors are supported if you use gnuplot 4.2. Octave
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
20 can still use gnuplot 4.0, but there is no way to set arbitrary
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
21 line colors with it when using the Matlab-style plot functions.
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
22 There never was any way to do this reliably with older versions
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
23 of gnuplot (whether run from Octave or not) since it only
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
24 provided a limited set to choose from, and they were terminal
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
25 dependent, so choosing color 1 with the X11 terminal would be
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
26 different from color 1 with the PostScript terminal. Valid RGB
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
27 colors for gnuplot 4.0 are the eight possible combinations of 0
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
28 and 1 for the R, G and B values. Invalid values are all mapped
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
29 to the same color.
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
30 <p>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
31 This also affects patch objects used in the bar, countour, meshc
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
32 and surfc functions, where the bars and contours will be
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
33 monochrome. A workaround for this is to type "colormap gmap40"
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
34 that loads a colormap that in many cases will be adequate for
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
35 simple bar and contour plots.</li>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
36
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
37 <li> You can control the width of lines using (for example):
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
38 <pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
39 line (x, y, "linewidth", 4, "color", [1, 0, 0.5]);
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
40 </pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
41 (this also shows the color feature).</li>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
42
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
43 <li> With gnuplot 4.2, image data is plotted with gnuplot and may be
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
44 combined with other 2-d plot data.</li>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
45
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
46 <li> Lines for contour plots are generated with an Octave function, so
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
47 contour plots are now 2-d plots instead of special 3-d plots, and
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
48 this allows you to plot additional 2-d data on top of a contour
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
49 plot.</li>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
50
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
51 <li> With the gnuplot "extended" terminals the TeX interpreter is
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
52 emulated. However, this means that the TeX interpreter is only
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
53 supported on the postscript terminals with gnuplot 4.0. Under
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
54 gnuplot 4.2 the terminals aqua, dumb, png, jpeg, gif, pm, windows,
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
55 wxt, svg and x11 are supported as well.</li>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
56
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
57 <li> The following plot commands are now considered obsolete and will
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
58 be removed from a future version of Octave:
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
59 <pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
60 __gnuplot_set__
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
61 __gnuplot_show__
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
62 __gnuplot_plot__
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
63 __gnuplot_splot__
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
64 __gnuplot_replot__
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
65 </pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
66 Additionally, these functions no longer have any effect on plots
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
67 created with the Matlab-style plot commands
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
68 (<tt>plot</tt>, <tt>line</tt>, <tt>mesh</tt>, <tt>semilogx</tt>,
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
69 etc.).
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
70
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
71 <li> Plot property values are not extensively checked. Specifying
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
72 invalid property values may produce unpredictible results.</li>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
73
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
74 <li> Octave now sends data over the same pipe that is used to send
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
75 commands to gnuplot. While this avoids the problem of
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
76 cluttering /tmp with data files, it is no longer possible to use
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
77 the mouse to zoom in on plots. This is a limitation of gnuplot,
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
78 which is unable to zoom when the data it plots is not stored in
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
79 a file. Some work has been done to fix this problem in newer
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
80 versions of gnuplot (> 4.2.2). See for example,
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
81 <a href="http://www.nabble.com/zooming-of-inline-data-tf4357017.html#a12416496">this thread</a> on the gnuplot development list.
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
82 </ul></li>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
83
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
84
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
85 <li>The way Octave handles search paths has changed. Instead of
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
86 setting the built-in variable <tt>LOADPATH</tt>, you must
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
87 use <tt>addpath</tt>, <tt>rmpath</tt>, or <tt>path</tt> to
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
88 manipulate the function search path. These functions will
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
89 maintain <tt>"."</tt> at the head of the path, for compatibility
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
90 with Matlab.
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
91 <p>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
92 Leading, trailing or doubled colons are no longer special.
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
93 Now, all elements of the search path are explicitly included in
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
94 the path when Octave starts. To display the path, use
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
95 the <tt>path</tt> function.
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
96 <p>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
97 Path elements that end in <tt>//</tt> are no longer searched recursively.
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
98 Instead, you may use addpath and the genpath function to add an
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
99 entire directory tree to the path. For example,
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
100 <pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
101 addpath (genpath ("~/octave"));
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
102 </pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
103 will add ~/octave and all directories below it to the head of the
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
104 path.</li>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
105
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
106
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
107 <li>Previous versions of Octave had a number of built-in variables to
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
108 control warnings (for example, <tt>warn_divide_by_zero</tt>). These
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
109 variables have been replaced by warning identifiers that are used
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
110 with the warning function to control the state of warnings.
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
111 <p>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
112 For example, instead of writing
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
113 <pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
114 warn_divide_by_zero = false;
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
115 </pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
116 to disable divide-by-zero warnings, you should write
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
117 <pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
118 warning ("off", "Octave:divide-by-zero");
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
119 </pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
120 You may use the same technique in your own code to control
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
121 warnings. For example, you can use
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
122 <pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
123 warning ("My-package:phase-of-the-moon",
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
124 "the phase of the moon could cause trouble today");
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
125 </pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
126 to allow users to control this warning using the
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
127 <tt>"My-package:phase-of-the-moon"</tt> warning identifier.
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
128 <p>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
129 You may also enable or disable all warnings, or turn them into
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
130 errors:
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
131 <pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
132 warning ("on", "all");
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
133 warning ("off", "all");
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
134 warning ("error", "Octave:divide-by-zero");
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
135 warning ("error", "all");
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
136 </pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
137 You can query the state of current warnings using
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
138 <pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
139 warning ("query", ID)
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
140 warning ("query")
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
141 </pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
142 (only those warning IDs which have been explicitly set are
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
143 returned).
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
144 <p>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
145 A partial list and description of warning identifiers is available
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
146 using
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
147 <pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
148 help warning_ids
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
149 </pre></li>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
150
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
151
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
152 <li>All built-in variables have been converted to functions. This
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
153 change simplifies the interpreter and allows a consistent
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
154 interface to internal variables for user-defined packages and the
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
155 core functions distributed with Octave. In most cases, code that
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
156 simply accesses internal variables does not need to change. Code
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
157 that sets internal variables will change. For example, instead of
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
158 writing
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
159 <pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
160 PS1 = ">> ";
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
161 </pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
162 you will need to write
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
163 <pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
164 PS1 (">> ");
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
165 </pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
166 If you need write code that will run in both old and new versions
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
167 of Octave, you can use something like
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
168 <pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
169 if (exist ("OCTAVE_VERSION") == 5)
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
170 ## New:
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
171 PS1 (">> ");
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
172 else
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
173 ## Old:
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
174 PS1 = ">> ";
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
175 endif
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
176 </pre></li>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
177
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
178
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
179 <li>For compatibility with Matlab, the output order of Octave's
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
180 <tt>"system"</tt> function has changed from
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
181 <pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
182 [output, status] = system (cmd);
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
183 </pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
184 to
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
185 <pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
186 [status, output] = system (cmd);
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
187 </pre></li>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
188
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
189
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
190 <li>For compatibility with Matlab, <tt>normcdf</tt>, <tt>norminv</tt>,
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
191 <tt>normpdf</tt>, and <tt>normrnd</tt> have been modified to
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
192 compute distributions using the standard deviation instead of the
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
193 variance.</li>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
194
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
195
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
196 <li>For compatibility with Matlab, the output of Octave's fsolve
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
197 function has been changed from
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
198 <pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
199 [x, info, msg] = fsolve (...);
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
200 </pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
201 to
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
202 <pre>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
203 [x, fval, info] = fsolve (...);
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
204 </pre></li>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
205
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
206
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
207 <li>For compatibility with Matlab, <tt>normcdf</tt>, <tt>norminv</tt>,
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
208 <tt>normpdf</tt>, and <tt>normrnd</tt> have been modified to
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
209 compute distributions using the standard deviation instead of the
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
210 variance.</li>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
211
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
212
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
213 <li>For compatibility with
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
214 Matlab, <tt>gamcdf</tt>, <tt>gaminv</tt>, <tt>gampdf</tt>,
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
215 <tt>gamrnd</tt>, <tt>expcdf</tt>, <tt>expinv</tt>, <tt>exppdf</tt>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
216 and <tt>exprnd</tt> have been modified to compute the
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
217 distributions using the standard scale factor rather than one over
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
218 the scale factor.
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
219 </ul>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
220
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
221 </body>
e8fc61e077fc Merged closed branch "kai" into default.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
222 </html>