215
|
1 --- |
|
2 layout: page |
|
3 title: GNU Octave Version 5 |
|
4 permalink: NEWS-5.1.html |
|
5 --- |
|
6 |
|
7 ## Summary of important user-visible changes |
|
8 |
|
9 February 23, 2019 |
|
10 |
|
11 {% include release_news_select.md %} |
|
12 |
|
13 {::options parse_block_html="true" /} |
|
14 <div class="panel callout"> |
|
15 * TOC |
|
16 {:toc} |
|
17 </div> |
|
18 {::options parse_block_html="false" /} |
|
19 |
|
20 ### General improvements |
|
21 |
|
22 - The Octave plotting system now supports high resolution screens, |
|
23 i.e., those with greater than 96 DPI which are referred to as |
|
24 HiDPI/Retina monitors. |
|
25 |
|
26 - Unicode character support for files and folders in Windows. |
|
27 |
|
28 - A new core function `movfun` will apply a function to a sliding |
|
29 window of arbitrary size on a dataset and accumulate the results. |
|
30 Many common cases have been implemented using the naming |
|
31 scheme `movXXX` where `XXX` is the function that will be applied. |
|
32 For example, the moving average over a dataset is `movmean`. |
|
33 New moving window functions: |
|
34 |
|
35 `movfun` `movslice` |
|
36 `movmad` `movmax` `movmean` `movmedian` `movmin` `movprod` |
|
37 `movstd` `movsum` `movvar` |
|
38 |
|
39 - The `fsolve` function has been tweaked to use larger step sizes when |
|
40 calculating the Jacobian of a function with finite differences. |
|
41 This leads to faster convergence. |
|
42 |
|
43 - The `ranks` function has been recoded for performance and is now 25X |
|
44 faster. In addition, it now supports a third argument that specifies |
|
45 how to resolve the ranking of tie values. |
|
46 |
|
47 - The function `randi` has been recoded to produce an unbiased (all |
|
48 results are equally likely) sample of integers. This may produce |
|
49 different results in existing code. If it is necessary to reproduce |
|
50 the exact random integer sequence as in previous versions use |
|
51 |
|
52 `ri = imin + floor ((imax - imin + 1) * rand ());` |
|
53 |
|
54 - The function `isdefinite` now returns `true` or `false` rather than |
|
55 `-1`, `0`, or `1`. To test for a positive semi-definite matrix (old |
|
56 output of `0`) check whether the following two conditions hold: |
|
57 |
|
58 `isdefinite (A) => 0` and `isdefinite (A + 5*TOL, TOL) => 1` |
|
59 |
|
60 - The `intmax`, `intmin`, and `flintmax` functions now accept a variable |
|
61 as input. Existing code to query the range of an existing variable can |
|
62 be simplified by removing the call to `class` that was previously |
|
63 required. For example defining the variable `x = int8 (3)` in the |
|
64 workspace, calls like |
|
65 |
|
66 `range = [ intmin(class(x)), intmax(class(x)) ]` |
|
67 |
|
68 can in Octave 5 be simplified to `range = [ intmin(x), intmax(x) ]`. |
|
69 |
|
70 - The path handling functions no longer perform variable or brace |
|
71 expansion on path elements and Octave's load-path is no longer |
|
72 subject to these expansions. |
|
73 |
|
74 - A new printing device is available, `"-ddumb"`, which produces ASCII |
|
75 art for plots. This device is only available with the gnuplot toolkit. |
|
76 |
|
77 |
|
78 ### Dependencies |
|
79 |
|
80 - The GUI requires Qt libraries. The minimum Qt4 version supported is |
|
81 Qt4.8. Qt5 of any version is preferred. |
|
82 |
|
83 - The OSMesa library is no longer used. To print invisible figures |
|
84 when using OpenGL graphics, the Qt `QOFFSCREENSURFACE` feature must be |
|
85 available and you must use the qt graphics toolkit. |
|
86 |
|
87 - The FFTW library is now required to perform FFT calculations. |
|
88 The FFTPACK sources have been removed from Octave. |
|
89 |
|
90 |
|
91 ### Matlab compatibility |
|
92 |
|
93 - The determination of an object's dimensions, size, and shape by the |
|
94 functions `ndims`, `rows`, `columns`, `isscalar`, `isvector`, |
|
95 `isrow`, `iscolumn`, `ismatrix`, and `issquare` now fully depends |
|
96 on the function size. Thus, any user-defined object can ensure correct |
|
97 treatment by the aforementioned functions by properly overloading the |
|
98 `size` function. |
|
99 |
|
100 - The functions `issymmetric` and `ishermitian` accept an option |
|
101 `"nonskew"` or `"skew"` to calculate the symmetric or skew-symmetric |
|
102 property of a matrix. Performance has also been increased. |
|
103 |
|
104 - The `issorted` function now uses a direction option of `"ascend"` |
|
105 or `"descend"`. Change all uses of `"ascending"` and `"descending"` |
|
106 in existing code to the new options. |
|
107 |
|
108 - The `strncmp` and `strncmpi` functions now return `true` if the two |
|
109 input strings match, even though the number of characters specified |
|
110 by `n` exceeds the string length. For Example: |
|
111 |
|
112 `strncmp ("abc", "abc", 100)` |
|
113 |
|
114 returns `true` in Octave 5 and `false` in older versions of Octave. |
|
115 |
|
116 - The `str2func` function no longer accepts a second `"global"` argument. |
|
117 This argument was typically used to allow functions that accept |
|
118 function names as arguments to avoid conflicts with subfunctions or |
|
119 nested functions. Instead, it's best to avoid this situation |
|
120 entirely and require users to pass function handles rather than |
|
121 function names. |
|
122 |
|
123 - Using `clear` with no arguments now removes only local variables |
|
124 from the current workspace. Global variables will no longer be |
|
125 visible, but they continue to exist in the global workspace and |
|
126 possibly other workspaces such as the base workspace. |
|
127 |
|
128 |
|
129 #### Nonlinear Equations |
|
130 |
|
131 Several default solver options have been changed to be Matlab compatible. |
|
132 This *may* result in existing code producing different results. |
|
133 |
|
134 - `fsolve` |
|
135 |
|
136 Option | New Default | Old Default |
|
137 ---------------|------------------|------------- |
|
138 `FinDiffType` | `"forward"` | `"central"` |
|
139 `MaxFunEvals` | `100*length(x0)` | `Inf` |
|
140 `TolFun` | `1e-6` | `1e-7` |
|
141 `TolX` | `1e-6` | `1e-7` |
|
142 `Updating` | `"off"` | `"on"` |
|
143 |
|
144 - `fminsearch` |
|
145 |
|
146 Option | New Default | Old Default |
|
147 ---------|-------------|------------ |
|
148 `TolFun` | `1e-7` | `1e-4` |
|
149 |
|
150 - `fminbnd` |
|
151 |
|
152 Option | New Default | Old Default |
|
153 ---------------|-------------|------------ |
|
154 `MaxFunEvals` | `500` | `Inf` |
|
155 `MaxIter` | `500` | `Inf` |
|
156 `TolX` | `1e-4` | `1e-8` |
|
157 |
|
158 - `fminunc` |
|
159 |
|
160 Option | New Default | Old Default |
|
161 ---------------|------------------|------------ |
|
162 `FinDiffType` | `"forward"` | `"central"` |
|
163 `MaxFunEvals` | `100*length(x0)` | `Inf` |
|
164 `TolX` | `1e-6` | `1e-7` |
|
165 `TolFun` | `1e-6` | `1e-7` |
|
166 |
|
167 |
|
168 #### Graphic objects |
|
169 |
|
170 - Figure graphic objects have a new property `"Number"` which is |
|
171 read-only and will return the handle (number) of the figure. |
|
172 However, if the property `"IntegerHandle"` has been set to `"off"` |
|
173 then the property will return an empty matrix `[]`. |
|
174 |
|
175 - Patch and surface graphic objects now use the `"FaceNormals"` property |
|
176 for flat lighting. |
|
177 |
|
178 - `"FaceNormals"` and `"VertexNormals"` for patch and surface graphic |
|
179 objects are now calculated only when necessary to improve graphics |
|
180 performance. In order for any normals to be calculated the |
|
181 `"FaceLighting"` property must be set to `"flat"` (FaceNormals) or |
|
182 `"gouraud"` (VertexNormals), **and** a light object must be present |
|
183 in the axes. |
|
184 |
|
185 - The `"Margin"` property of `text`-objects has a new default of `3` |
|
186 rather than `2`. |
|
187 |
|
188 - Printing to raster formats (bitmaps like PNG or JPEG) now uses an |
|
189 OpenGL-based method by default. The print options `"-opengl"` |
|
190 (raster) and `"-painters"` (vector) have been added ("qt" toolkit |
|
191 only). The figure property `"renderer"` specifies which renderer to |
|
192 use. When the property `"renderermode"` is `"auto"` Octave will select |
|
193 `"-opengl"` for a raster output format and `"-painters"` for a vector |
|
194 output format. |
|
195 |
|
196 - A new print option `"-RGBImage"` has been added which captures the |
|
197 pixels of a figure as an image. This is similar to screen capture |
|
198 tools, except that print formatting options can be used to, for |
|
199 example, change the resolution or display the image in black and |
|
200 white. |
|
201 |
|
202 - Two new print options for page-based formats (PDF, PostScript) have |
|
203 been added. The `"-fillpage"` option will stretch the plot to occupy |
|
204 the entire page with 0.25 inch margins all around. The `"-bestfit"` |
|
205 option will expand the plot to take up as much room as possible on |
|
206 the page without distorting the original aspect ratio of the plot. |
|
207 |
|
208 - Printing using the `"-dtiff"` output device will now create compressed |
|
209 images using LZW compression. To produce uncompressed images use the |
|
210 `"-dtiffn"` device. |
|
211 |
|
212 |
|
213 ### Legacy functions |
|
214 |
|
215 The following functions have been declared legacy functions which |
|
216 means they are obsolete and should not be used in any new code. |
|
217 Unlike deprecated functions, however, their removal from Octave has |
|
218 not yet been scheduled. |
|
219 |
|
220 Function | Replacement |
|
221 -----------------------|------------------ |
|
222 `findstr` | `strfind` |
|
223 `flipdim` | `flip` |
|
224 `isdir` | `isfolder` or `dir_in_loadpath` |
|
225 `isequalwithequalnans` | `isequaln` |
|
226 `isstr` | `ischar` |
|
227 `setstr` | `char` |
|
228 `strmatch` | `strncmp` or `strcmp` |
|
229 `strread` | `textscan` |
|
230 `textread` | `textscan` |
|
231 |
|
232 |
|
233 ### Deprecated functions and properties |
|
234 |
|
235 The following functions and graphics properties have been deprecated |
|
236 in Octave 5 and will be removed from Octave 7 (or whatever version |
|
237 is the second major release after 5): |
|
238 |
|
239 - Functions |
|
240 |
|
241 Function | Replacement |
|
242 -------------------------|------------------- |
|
243 `output_max_field_width` | `output_precision` |
|
244 `is_keyword` | `iskeyword` |
|
245 |
|
246 - Graphics properties |
|
247 |
|
248 Object | Property | Value |
|
249 -----------------|---------------|------------ |
|
250 `text` | `fontangle` | `"oblique"` |
|
251 `uibuttongroup` | `fontangle` | `"oblique"` |
|
252 `uicontrol` | `fontangle` | `"oblique"` |
|
253 `uipanel` | `fontangle` | `"oblique"` |
|
254 `uitable` | `fontangle` | `"oblique"` |
|
255 |
|
256 - Specifying `legend` position with a numeric argument is deprecated. |
|
257 Use a string argument instead. |
|
258 |
|
259 - The environment variable used by `mkoctfile` for linker flags is now |
|
260 `LDFLAGS` rather than `LFLAGS`. `LFLAGS` is deprecated, and a warning |
|
261 is emitted if is used, but it will continue to work. |
|
262 |
|
263 |
|
264 ### Removed functions and properties |
|
265 |
|
266 The following functions and properties were deprecated in Octave 4.2 |
|
267 and have been removed from Octave 5. |
|
268 |
|
269 - Functions |
|
270 |
|
271 Function | Replacement |
|
272 -----------------------|------------------ |
|
273 `bitmax` | `flintmax` |
|
274 `mahalanobis` | `mahal` in Octave Forge statistics pkg |
|
275 `md5sum` | `hash` |
|
276 `octave_config_info` | `__octave_config_info__` |
|
277 `onenormest` | `normest1` |
|
278 `sleep` | `pause` |
|
279 `usleep` | `pause` |
|
280 `wavread` | `audioread` |
|
281 `wavwrite` | `audiowrite` |
|
282 |
|
283 - Properties |
|
284 |
|
285 Object | Property | Value |
|
286 ------------|-------------------|--------- |
|
287 `axes` | `xaxislocation` | `"zero"` |
|
288 | `yaxislocation` | `"zero"` |
|
289 `hggroup` | `erasemode` | |
|
290 `image` | `erasemode` | |
|
291 `line` | `erasemode` | |
|
292 `patch` | `erasemode` | |
|
293 `patch` | `normalmode` | |
|
294 `surface` | `erasemode` | |
|
295 `surface` | `normalmode` | |
|
296 `text` | `erasemode` | |
|
297 |
|
298 |
|
299 ### Alphabetical list of new functions added in 5 |
|
300 |
|
301 - `clearvars` |
|
302 - `isfile` |
|
303 - `isfolder` |
|
304 - `matlab.lang.makeUniqueStrings` |
|
305 - `matlab.lang.makeValidName` |
|
306 - `movegui` |
|
307 - `movfun` |
|
308 - `movie` |
|
309 - `movmad` |
|
310 - `movmax` |
|
311 - `movmean` |
|
312 - `movmedian` |
|
313 - `movmin` |
|
314 - `movprod` |
|
315 - `movslice` |
|
316 - `movstd` |
|
317 - `movsum` |
|
318 - `movvar` |
|
319 - `openfig` |
|
320 - `ordeig` |
|
321 - `savefig` |
|
322 - `uitable` |