215
|
1 --- |
|
2 layout: page |
|
3 title: GNU Octave Version 3.4 |
|
4 permalink: NEWS-3.4.html |
|
5 --- |
|
6 |
|
7 ## Summary of important user-visible changes |
|
8 |
|
9 February 8, 2011 |
|
10 |
|
11 {% include release_news_select.md %} |
|
12 |
|
13 <pre> |
|
14 ** IMPORTANT note about binary incompatibility in this release: |
|
15 |
|
16 Binary compatibility for all 3.4.x releases was originally planned, |
|
17 but this is impossible for the 3.4.1 release due to a bug in the way |
|
18 shared libraries were built in Octave 3.4.0. Because of this bug, |
|
19 .oct files built for Octave 3.4.0 must be recompiled before they |
|
20 will work with Octave 3.4.1. |
|
21 |
|
22 Given that there would be binary incompatibilities with shared |
|
23 libraries going from Octave 3.4.0 to 3.4.1, the following |
|
24 incompatible changes were also made in this release: |
|
25 |
|
26 * The Perl Compatible Regular Expression (PCRE) library is now |
|
27 required to build Octave. |
|
28 |
|
29 * Octave's libraries and .oct files are now installed in |
|
30 subdirectories of $libdir instead of $libexecdir. |
|
31 |
|
32 Any future Octave 3.4.x release versions should remain binary |
|
33 compatible with Octave 3.4.1 as proper library versioning is now |
|
34 being used as recommended by the libtool manual. |
|
35 |
|
36 ** The following functions have been deprecated in Octave 3.4.1 and will |
|
37 be removed from Octave 3.8 (or whatever version is the second major |
|
38 release after 3.4): |
|
39 |
|
40 cquad is_duplicate_entry perror strerror |
|
41 |
|
42 ** The following functions are new in 3.4.1: |
|
43 |
|
44 colstyle gmres iscolumn isrow mgorth nproc rectangle |
|
45 |
|
46 ** The get_forge_pkg function is now private. |
|
47 |
|
48 ** The rectangle_lw, rectangle_sw, triangle_lw, and triangle_sw |
|
49 functions are now private. |
|
50 |
|
51 ** The logistic_regression_derivatives and logistic_regression_likelihood |
|
52 functions are now private. |
|
53 |
|
54 ** ChangeLog files in the Octave sources are no longer maintained |
|
55 by hand. Instead, there is a single ChangeLog file generated from |
|
56 the Mercurial version control commit messages. Older ChangeLog |
|
57 information can be found in the etc/OLD-ChangeLogs directory in the |
|
58 source distribution. |
|
59 |
|
60 Summary of important user-visible changes for version 3.4: |
|
61 --------------------------------------------------------- |
|
62 |
|
63 ** BLAS and LAPACK libraries are now required to build Octave. The |
|
64 subset of the reference BLAS and LAPACK libraries has been removed |
|
65 from the Octave sources. |
|
66 |
|
67 ** The `lookup' function was extended to be more useful for |
|
68 general-purpose binary searching. Using this improvement, the |
|
69 ismember function was rewritten for significantly better |
|
70 performance. |
|
71 |
|
72 ** Real, integer and logical matrices, when used in indexing, will now |
|
73 cache the internal index_vector value (zero-based indices) when |
|
74 successfully used as indices, eliminating the conversion penalty for |
|
75 subsequent indexing by the same matrix. In particular, this means it |
|
76 is no longer needed to avoid repeated indexing by logical arrays |
|
77 using find for performance reasons. |
|
78 |
|
79 ** Logical matrices are now treated more efficiently when used as |
|
80 indices. Octave will keep the index as a logical mask unless the |
|
81 ratio of true elements is small enough, using a specialized |
|
82 code. Previously, all logical matrices were always first converted |
|
83 to index vectors. This results in savings in both memory and |
|
84 computing time. |
|
85 |
|
86 ** The `sub2ind' and `ind2sub' functions were reimplemented as compiled |
|
87 functions for better performance. These functions are now faster, |
|
88 can deliver more economized results for ranges, and can reuse the |
|
89 index cache mechanism described in previous paragraph. |
|
90 |
|
91 ** The built-in function equivalents to associative operators (`plus', |
|
92 `times', `mtimes', `and', and `or') have been extended to accept |
|
93 multiple arguments. This is especially useful for summing |
|
94 (multiplying, etc.) lists of objects (of possibly distinct types): |
|
95 |
|
96 matrix_sum = plus (matrix_list{:}); |
|
97 |
|
98 ** An FTP object type based on libcurl has been implemented. These |
|
99 objects allow ftp connections, downloads and uploads to be |
|
100 managed. For example, |
|
101 |
|
102 fp = ftp ("ftp.octave.org); |
|
103 cd (fp, "gnu/octave"); |
|
104 mget (fp, "octave-3.2.3.tar.bz2"); |
|
105 close (fp); |
|
106 |
|
107 ** The default behavior of `assert (observed, expected)' has been |
|
108 relaxed to employ less strict checking that does not require the |
|
109 internals of the values to match. This avoids previously valid |
|
110 tests from breaking due to new internal classes introduced in future |
|
111 Octave versions. |
|
112 |
|
113 For instance, all of these assertions were true in Octave 3.0.x |
|
114 but false in 3.2.x due to new optimizations and improvements: |
|
115 |
|
116 assert (2*linspace (1, 5, 5), 2*(1:5)) |
|
117 assert (zeros (0, 0), []) |
|
118 assert (2*ones (1, 5), (2) (ones (1,5))) |
|
119 |
|
120 ** The behavior of library functions `ismatrix', `issquare', and |
|
121 `issymmetric' has been changed for better consistency. |
|
122 |
|
123 * The `ismatrix' function now returns true for all numeric, |
|
124 logical and character 2-D or N-D matrices. Previously, `ismatrix' |
|
125 returned false if the first or second dimension was zero. |
|
126 Hence, `ismatrix ([])' was false, |
|
127 while `ismatrix (zeros (1,2,0))' was true. |
|
128 |
|
129 * The `issquare' function now returns a logical scalar, and is |
|
130 equivalent to the expression |
|
131 |
|
132 ismatrix (x) && ndims (x) == 2 && rows (x) == columns (x) |
|
133 |
|
134 The dimension is no longer returned. As a result, `issquare ([])' |
|
135 now yields true. |
|
136 |
|
137 * The `issymmetric' function now checks for symmetry instead of |
|
138 Hermitianness. For the latter, ishermitian was created. Also, |
|
139 logical scalar is returned rather than the dimension, so |
|
140 `issymmetric ([])' is now true. |
|
141 |
|
142 ** Function handles are now aware of overloaded functions. If a |
|
143 function is overloaded, the handle determines at the time of its |
|
144 reference which function to call. A non-overloaded version does not |
|
145 need to exist. |
|
146 |
|
147 ** Overloading functions for built-in classes (double, int8, cell, |
|
148 etc.) is now compatible with Matlab. |
|
149 |
|
150 ** Function handles can now be compared with the == and != operators, |
|
151 as well as the `isequal' function. |
|
152 |
|
153 ** Performance of concatenation (using []) and the functions `cat', |
|
154 `horzcat', and `vertcat' has been improved for multidimensional |
|
155 arrays. |
|
156 |
|
157 ** The operation-assignment operators +=, -=, *= and /= now behave more |
|
158 efficiently in certain cases. For instance, if M is a matrix and S a |
|
159 scalar, then the statement |
|
160 |
|
161 M += S; |
|
162 |
|
163 will operate on M's data in-place if it is not shared by another |
|
164 variable, usually increasing both time and memory efficiency. |
|
165 |
|
166 Only selected common combinations are affected, namely: |
|
167 |
|
168 matrix += matrix |
|
169 matrix -= matrix |
|
170 matrix .*= matrix |
|
171 matrix ./= matrix |
|
172 |
|
173 matrix += scalar |
|
174 matrix -= scalar |
|
175 matrix *= scalar |
|
176 matrix /= scalar |
|
177 |
|
178 logical matrix |= logical matrix |
|
179 logical matrix &= logical matrix |
|
180 |
|
181 where matrix and scalar belong to the same class. The left-hand |
|
182 side must be a simple variable reference. |
|
183 |
|
184 Moreover, when unary operators occur in expressions, Octave will |
|
185 also try to do the operation in-place if it's argument is a |
|
186 temporary expresssion. |
|
187 |
|
188 ** The effect of comparison operators (<, >, <=, and >=) applied to |
|
189 complex numbers has changed to be consistent with the strict |
|
190 ordering defined by the `max', `min', and `sort' functions. More |
|
191 specifically, complex numbers are compared by lexicographical |
|
192 comparison of the pairs `[abs(z), arg(z)]'. Previously, only real |
|
193 parts were compared; this can be trivially achieved by wrapping the |
|
194 operands in real(). |
|
195 |
|
196 ** The automatic simplification of complex computation results has |
|
197 changed. Octave will now simplify any complex number with a zero |
|
198 imaginary part or any complex matrix with all elements having zero |
|
199 imaginary part to a real value. Previously, this was done only for |
|
200 positive zeros. Note that the behavior of the complex function is |
|
201 unchanged and it still produces a complex value even if the |
|
202 imaginary part is zero. |
|
203 |
|
204 ** As a side effect of code refactoring in liboctave, the binary |
|
205 logical operations are now more easily amenable to compiler |
|
206 optimizations and are thus significantly faster. |
|
207 |
|
208 ** Octave now allows user-defined `subsasgn' methods to optimize out |
|
209 redundant copies. For more information, see the manual. |
|
210 |
|
211 ** More efficient matrix division handling. Octave is now able to |
|
212 handle the expressions |
|
213 |
|
214 M' \ V |
|
215 M.' \ V |
|
216 V / M |
|
217 |
|
218 (M is a matrix and V is a vector) more efficiently in certain cases. |
|
219 In particular, if M is triangular, all three expressions will be |
|
220 handled by a single call to xTRTRS (from LAPACK), with appropriate |
|
221 flags. Previously, all three expressions required a physical |
|
222 transpose of M. |
|
223 |
|
224 ** More efficient handling of certain mixed real-complex matrix |
|
225 operations. For instance, if RM is a real matrix and CM a complex |
|
226 matrix, |
|
227 |
|
228 RM * CM |
|
229 |
|
230 can now be evaluated either as |
|
231 |
|
232 complex (RM * real (CM), RM * imag (CM)) |
|
233 |
|
234 or as |
|
235 |
|
236 complex (RM) * CM, |
|
237 |
|
238 depending on the dimensions. The first form requires more |
|
239 temporaries and copying, but halves the FLOP count, which normally |
|
240 brings better performance if RM has enough rows. Previously, the |
|
241 second form was always used. |
|
242 |
|
243 Matrix division is similarly affected. |
|
244 |
|
245 ** More efficient handling of triangular matrix factors returned from |
|
246 factorizations. The functions for computing QR, LU and Cholesky |
|
247 factorizations will now automatically return the triangular matrix |
|
248 factors with proper internal matrix_type set, so that it won't need |
|
249 to be computed when the matrix is used for division. |
|
250 |
|
251 ** The built-in `sum' function now handles the non-native summation |
|
252 (i.e., double precision sum of single or integer inputs) more |
|
253 efficiently, avoiding a temporary conversion of the whole input |
|
254 array to doubles. Further, `sum' can now accept an extra option |
|
255 argument, using a compensated summation algorithm rather than a |
|
256 straightforward sum, which significantly improves precision if lots |
|
257 of cancellation occurs in the summation. |
|
258 |
|
259 ** The built-in `bsxfun' function now uses optimized code for certain |
|
260 cases where built-in operator handles are passed in. Namely, the |
|
261 optimizations concern the operators `plus', `minus', `times', |
|
262 `ldivide', `rdivide', `power', `and', `or' (for logical arrays), |
|
263 the relational operators `eq', `ne', `lt', `le', `gt', `ge', and the |
|
264 functions `min' and `max'. Optimizations only apply when both |
|
265 operands are of the same built-in class. Mixed real/complex and |
|
266 single/double operations will first convert both operands to a |
|
267 common type. |
|
268 |
|
269 ** The `strfind' and `strrep' functions now have compiled |
|
270 implementations, facilitating significantly more efficient searching |
|
271 and replacing in strings, especially with longer patterns. The code |
|
272 of `strcat' has been vectorized and is now much more efficient when |
|
273 many strings are concatenated. The `strcmpi' and `strncmpi' |
|
274 functions are now built-in functions, providing better performance. |
|
275 |
|
276 ** Matlab-style ignoring input and output function arguments using |
|
277 tilde (~) is now supported. Ignored output arguments may be |
|
278 detected from a function using the built-in function `isargout'. |
|
279 For more details, consult the manual. |
|
280 |
|
281 ** The list datatype, deprecated since the introduction of cells, has |
|
282 been removed. |
|
283 |
|
284 ** The accumarray function has been optimized and is now significantly |
|
285 faster in certain important cases. |
|
286 |
|
287 ** The behavior of isreal and isnumeric functions was changed to be more |
|
288 Matlab-compatible. |
|
289 |
|
290 ** The integer math & conversion warnings (Octave:int-convert-nan, |
|
291 Octave:int-convert-non-int-val, Octave:int-convert-overflow, |
|
292 Octave:int-math-overflow) have been removed. |
|
293 |
|
294 ** rem and mod are now built-in functions. They also handle integer |
|
295 types efficiently using integer arithmetic. |
|
296 |
|
297 ** Sparse indexing and indexed assignment has been mostly rewritten. |
|
298 Since Octave uses compressed column storage for sparse matrices, |
|
299 major attention is devoted to operations manipulating whole columns. |
|
300 Such operations are now significantly faster, as well as some other |
|
301 important cases. |
|
302 |
|
303 Further, it is now possible to pre-allocate a sparse matrix and |
|
304 subsequently fill it by assignments, provided they meet certain |
|
305 conditions. For more information, consult the `spalloc' function, |
|
306 which is no longer a mere dummy. Consequently, nzmax and nnz are no |
|
307 longer always equal in Octave. Octave may also produce a matrix |
|
308 with nnz < nzmax as a result of other operations, so you should |
|
309 consistently use nnz unless you really want to use nzmax (i.e. the |
|
310 space allocated for nonzero elements). |
|
311 |
|
312 Sparse concatenation is also affected, and concatenating sparse |
|
313 matrices, especially larger collections, is now significantly more |
|
314 efficient. This applies to both the [] operator and the |
|
315 cat/vertcat/horzcat functions. |
|
316 |
|
317 ** It is now possible to optionally employ the xGESDD LAPACK drivers |
|
318 for computing the singular value decomposition using svd(), instead |
|
319 of the default xGESVD, using the configuration pseudo-variable |
|
320 svd_driver. The xGESDD driver can be up to 6x times faster when |
|
321 singular vectors are requested, but is reported to be somewhat less |
|
322 robust on highly ill-conditioned matrices. |
|
323 |
|
324 ** Configuration pseudo-variables, such as page_screen_output or |
|
325 confirm_recursive_rmdir (or the above mentioned svd_driver), now |
|
326 accept a "local" option as second argument, requesting the change |
|
327 to be undone when the current function returns: |
|
328 |
|
329 function [status, msg] = rm_rf (dir) |
|
330 confirm_recursive_rmdir (false, "local"); |
|
331 [status, msg] = rmdir (dir, "s"); |
|
332 ... |
|
333 endfunction |
|
334 |
|
335 Upon return, confirm_recursive_rmdir will be restored to the value |
|
336 it had on entry to the function, even if there were subsequent |
|
337 changes to the variable in function rm_rf or any of the functions |
|
338 it calls. |
|
339 |
|
340 ** pkg now accepts a -forge option for downloading and installing |
|
341 packages from Octave Forge automatically. For example, |
|
342 |
|
343 pkg install -forge general |
|
344 |
|
345 will automatically download the latest release of the general |
|
346 package and attempt to install it. No automatic resolving of |
|
347 dependencies is provided. Further, |
|
348 |
|
349 pkg list -forge |
|
350 |
|
351 can be used to list all available packages. |
|
352 |
|
353 ** The internal data representation of structs has been completely |
|
354 rewritten to make certain optimizations feasible. The field data |
|
355 can now be shared between structs with equal keys but different |
|
356 dimensions or values, making operations that preserve the fields |
|
357 faster. Economized storage is now used for scalar structs (just |
|
358 like most other scalars), making their usage more |
|
359 memory-efficient. Certain array-like operations on structs |
|
360 (concatenation, uniform cellfun, num2cell) have gained a |
|
361 significant speed-up. Additionally, the octave_scalar_map class |
|
362 now provides a simpler interface to work with scalar structs within |
|
363 a C++ DLD function. |
|
364 |
|
365 ** Two new formats are available for displaying numbers: |
|
366 |
|
367 format short eng |
|
368 format long eng |
|
369 |
|
370 Both display numbers in engineering notation, i.e., mantissa + |
|
371 exponent where the exponent is a multiple of 3. |
|
372 |
|
373 ** The following functions are new in Octave 3.4: |
|
374 |
|
375 accumdim erfcx nfields pqpnonneg uigetdir |
|
376 bitpack fileread nth_element quadcc uigetfile |
|
377 bitunpack fminbnd onCleanup randi uiputfile |
|
378 blkmm fskipl pbaspect repelems uimenu |
|
379 cbrt ifelse pie3 reset whitebg |
|
380 curl ishermitian powerset rsf2csf |
|
381 chop isindex ppder saveas |
|
382 daspect luupdate ppint strread |
|
383 divergence merge ppjumps textread |
|
384 |
|
385 ** Using the image function to view images with external programs such |
|
386 as display, xv, and xloadimage is no longer supported. The |
|
387 image_viewer function has also been removed. |
|
388 |
|
389 ** The behavior of struct assignments to non-struct values has been |
|
390 changed. Previously, it was possible to overwrite an arbitrary |
|
391 value: |
|
392 |
|
393 a = 1; |
|
394 a.x = 2; |
|
395 |
|
396 This is no longer possible unless a is an empty matrix or cell |
|
397 array. |
|
398 |
|
399 ** The dlmread function has been extended to allow specifying a custom |
|
400 value for empty fields. |
|
401 |
|
402 ** The dlmread and dlmwrite functions have been modified to accept |
|
403 file IDs (as returned by fopen) in addition to file names. |
|
404 |
|
405 ** Octave can now optimize away the interpreter overhead of an |
|
406 anonymous function handle, if the function simply calls another |
|
407 function or handle with some of its parameters bound to certain |
|
408 values. Example: |
|
409 |
|
410 f = @(x) sum (x, 1); |
|
411 |
|
412 When f is called, the call is forwarded to @sum with the constant 1 |
|
413 appended, and the anonymous function call does not occur on the |
|
414 call stack. |
|
415 |
|
416 ** Deprecated functions. |
|
417 |
|
418 The following functions were deprecated in Octave 3.0 and have been |
|
419 removed from Octave 3.4. |
|
420 |
|
421 beta_cdf geometric_pdf pascal_pdf |
|
422 beta_inv geometric_rnd pascal_rnd |
|
423 beta_pdf hypergeometric_cdf poisson_cdf |
|
424 beta_rnd hypergeometric_inv poisson_inv |
|
425 binomial_cdf hypergeometric_pdf poisson_pdf |
|
426 binomial_inv hypergeometric_rnd poisson_rnd |
|
427 binomial_pdf intersection polyinteg |
|
428 binomial_rnd is_bool setstr |
|
429 chisquare_cdf is_complex struct_contains |
|
430 chisquare_inv is_list struct_elements |
|
431 chisquare_pdf is_matrix t_cdf |
|
432 chisquare_rnd is_scalar t_inv |
|
433 clearplot is_square t_pdf |
|
434 clg is_stream t_rnd |
|
435 com2str is_struct uniform_cdf |
|
436 exponential_cdf is_symmetric uniform_inv |
|
437 exponential_inv is_vector uniform_pdf |
|
438 exponential_pdf isstr uniform_rnd |
|
439 exponential_rnd lognormal_cdf weibcdf |
|
440 f_cdf lognormal_inv weibinv |
|
441 f_inv lognormal_pdf weibpdf |
|
442 f_pdf lognormal_rnd weibrnd |
|
443 f_rnd meshdom weibull_cdf |
|
444 gamma_cdf normal_cdf weibull_inv |
|
445 gamma_inv normal_inv weibull_pdf |
|
446 gamma_pdf normal_pdf weibull_rnd |
|
447 gamma_rnd normal_rnd wiener_rnd |
|
448 geometric_cdf pascal_cdf |
|
449 geometric_inv pascal_inv |
|
450 |
|
451 The following functions were deprecated in Octave 3.2 and will |
|
452 be removed from Octave 3.6 (or whatever version is the second major |
|
453 release after 3.2): |
|
454 |
|
455 create_set spcholinv splu |
|
456 dmult spcumprod spmax |
|
457 iscommand spcumsum spmin |
|
458 israwcommand spdet spprod |
|
459 lchol spdiag spqr |
|
460 loadimage spfind spsum |
|
461 mark_as_command sphcat spsumsq |
|
462 mark_as_rawcommand spinv spvcat |
|
463 spatan2 spkron str2mat |
|
464 spchol splchol unmark_command |
|
465 spchol2inv split unmark_rawcommand |
|
466 |
|
467 The following functions have been deprecated in Octave 3.4 and will |
|
468 be removed from Octave 3.8 (or whatever version is the second major |
|
469 release after 3.4): |
|
470 |
|
471 autocor cellidx gammai krylovb values |
|
472 autocov dispatch glpkmex replot |
|
473 betai fstat is_global saveimage |
|
474 |
|
475 * For compatibility with Matlab, mu2lin (x) is now equivalent to |
|
476 mu2lin (x, 0). |
|
477 |
|
478 * The ARPACK library is now distributed with Octave so it no longer |
|
479 needs to be available as an external dependency when building |
|
480 Octave. |
|
481 </pre> |