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