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