3035
|
1 Summary of changes for version 2.1.x: |
2993
|
2 ------------------------------------ |
|
3 |
3196
|
4 * The built-in variable argv is now a list of strings instead of a |
|
5 string vector. |
|
6 |
|
7 * The value of LOADPATH set by the environment variable |
|
8 OCTAVE_PATH, the -p or --path command line options, or on the |
|
9 command line is no longer modified to include the default path. |
|
10 Instead it is left as specified. Its default value is now ":", |
|
11 which tells Octave to search the default path, and the new |
|
12 built-in variable DEFAULT_LOADPATH contains the default list of |
|
13 directories to search. |
|
14 |
|
15 * The function file_in_path no longer does any special processing of |
|
16 its PATH argument. To search LOADPATH for files, it is now |
|
17 generally better to use the new function file_in_loadpath. |
|
18 |
3180
|
19 * If fread is given a skip parameter, the skip is performed after |
|
20 the read instead of before (for compatibility with Matlab). |
|
21 |
3189
|
22 * The new built-in variable `crash_dumps_octave_core' controls |
|
23 whether Octave writes user variables to the file `octave-core' |
|
24 when it crashes or is killed by a signal. The default value is 1 |
|
25 (0 if you use --traditional). |
|
26 |
3192
|
27 * If LOADPATH contains a doubled colon, the default path is inserted |
|
28 in its place. This is similar to the substitution that also takes |
|
29 place for leading or trailing colons in the LOADPATH. |
|
30 |
|
31 * Loops of the form `for i = STRING ... endfor' are now allowed. |
|
32 |
|
33 * It is now possible to set the iteration limit for lsode using |
|
34 lsode_options ("step limit", N). |
|
35 |
|
36 * New functions: |
|
37 |
|
38 is_complex -- tell whether a variable is complex |
|
39 rehash -- re-initialize the cache of directories in LOADPATH |
|
40 graw -- send a string to the gnuplot subprocess |
|
41 |
|
42 * New functions from Kurt Hornik's Octave-ci package: |
|
43 |
|
44 In finance (new directory): |
|
45 |
3202
|
46 fv -- future value of an investment |
|
47 fvl -- future value of an initial lump sum investment |
|
48 irr -- internal rate of return of an investment |
|
49 nper -- number of payments needed for amortizing a loan |
|
50 npv -- net present value of a series of payments |
|
51 pmt -- amount of periodic payment needed to amortize a loan |
|
52 pv -- present value of an investment |
|
53 pvl -- present value of an investment that pays off at the end |
|
54 rate -- rate of return of an investment |
|
55 vol -- volatility of financial time series data |
3192
|
56 |
|
57 In linear-algebra: |
|
58 |
3202
|
59 dmult -- rescale the rows of a matrix |
3192
|
60 |
|
61 In signal: |
|
62 |
3202
|
63 arch_fit -- fit an ARCH regression model |
|
64 arch_rnd -- simulate an ARCH process |
|
65 arch_test -- test for conditional heteroscedascity |
|
66 arma_rnd -- simulate an ARMA process |
|
67 autocor -- compute autocorrelations |
|
68 autocov -- compute autocovariances |
|
69 autoreg_matrix -- design matrix for autoregressions |
|
70 bartlett -- coefficients of the Bartlett (triangular) window |
|
71 blackman -- coefficients of the Blackman window |
|
72 diffpara -- estimate the fractional differencing parameter |
|
73 durbinlevinson -- perform one step of the Durbin-Levinson algorithm |
|
74 fractdiff -- compute fractional differences |
|
75 hamming -- coefficients of the Hamming window |
|
76 hanning -- coefficients of the Hanning window |
|
77 hurst -- estimate the Hurst parameter |
|
78 periodogram -- compute the periodogram |
|
79 rectangle_lw -- rectangular lag window |
|
80 rectangle_sw -- rectangular spectral window |
|
81 sinetone -- compute a sine tone |
|
82 sinewave -- compute a sine wave |
|
83 spectral_adf -- spectral density estimation |
|
84 spectral_xdf -- spectral density estimation |
|
85 spencer -- apply Spencer's 15-point MA filter |
|
86 stft -- short-term Fourier transform |
|
87 synthesis -- recover a signal from its short-term Fourier transform |
|
88 triangle_lw -- triangular lag window |
|
89 triangle_sw -- triangular spectral window |
|
90 yulewalker -- fit AR model by Yule-Walker method |
3192
|
91 |
|
92 In statistics/base (new directory): |
|
93 |
3202
|
94 center -- center by subtracting means |
|
95 cloglog -- complementary log-log function |
|
96 cor -- compute correlations |
|
97 cov -- compute covariances |
|
98 cut -- cut data into intervals |
|
99 iqr -- interquartile range |
|
100 kendall -- kendall's rank correlation tau |
|
101 logit -- logit transformation |
|
102 mean -- compute arithmetic, geometric, and harmonic mean |
|
103 meansq -- compute mean square |
|
104 moment -- compute moments |
|
105 ppplot -- perform a PP-plot (probability plot) |
|
106 probit -- probit transformation |
|
107 qqplot -- perform a QQ-plot (quantile plot) |
|
108 range -- compute range |
|
109 ranks -- compute ranks |
|
110 run_count -- count upward runs |
|
111 spearman -- spearman's rank correlation rho |
|
112 statistics -- compute basic statistics |
|
113 studentize -- subtract mean and divide by standard deviation |
|
114 table -- cross tabulation |
|
115 values -- extract unique elements |
|
116 var -- compute variance |
3192
|
117 |
|
118 In statistics/distributions (new directory): |
|
119 |
3202
|
120 beta_cdf -- CDF of the Beta distribution |
|
121 beta_inv -- Quantile function of the Beta distribution |
|
122 beta_pdf -- PDF of the Beta distribution |
|
123 beta_rnd -- Random deviates from the Beta distribution |
|
124 |
|
125 binomial_cdf -- CDF of the binomial distribution |
|
126 binomial_inv -- Quantile function of the binomial distribution |
|
127 binomial_pdf -- PDF of the binomial distribution |
|
128 binomial_rnd -- Random deviates from the binomial distribution |
|
129 |
|
130 cauchy_cdf -- CDF of the Cauchy distribution |
|
131 cauchy_inv -- Quantile function of the Cauchy distribution |
|
132 cauchy_pdf -- PDF of the Cauchy distribution |
|
133 cauchy_rnd -- Random deviates from the Cauchy distribution |
|
134 |
|
135 chisquare_cdf -- CDF of the chi-square distribution |
|
136 chisquare_inv -- Quantile function of the chi-square distribution |
|
137 chisquare_pdf -- PDF of the chi-sqaure distribution |
|
138 chisquare_rnd -- Random deviates from the chi-square distribution |
|
139 |
|
140 discrete_cdf -- CDF of a discrete distribution |
|
141 discrete_inv -- Quantile function of a discrete distribution |
|
142 discrete_pdf -- PDF of a discrete distribution |
|
143 discrete_rnd -- Random deviates from a discrete distribution |
|
144 |
|
145 empirical_cdf -- CDF of the empirical distribution |
|
146 empirical_inv -- Quantile function of the empirical distribution |
|
147 empirical_pdf -- PDF of the empirical distribution |
|
148 empirical_rnd -- Bootstrap samples from the empirical distribution |
|
149 |
|
150 exponential_cdf -- CDF of the exponential distribution |
|
151 exponential_inv -- Quantile function of the exponential distribution |
|
152 exponential_pdf -- PDF of the exponential distribution |
|
153 exponential_rnd -- Random deviates from the exponential distribution |
|
154 |
|
155 f_cdf -- CDF of the F distribution |
|
156 f_inv -- Quantile function of the F distribution |
|
157 f_pdf -- PDF of the F distribution |
|
158 f_rnd -- Random deviates from the F distribution |
|
159 |
|
160 gamma_cdf -- CDF of the Gamma distribution |
|
161 gamma_inv -- Quantile function of the Gamma distribution |
|
162 gamma_pdf -- PDF of the Gamma distribution |
|
163 gamma_rnd -- Random deviates from the Gamma distribution |
|
164 |
|
165 geometric_cdf -- CDF of the geometric distribution |
|
166 geometric_inv -- Quantile function of the geometric distribution |
|
167 geometric_pdf -- PDF of the geometric distribution |
|
168 geometric_rnd -- Random deviates from the geometric distribution |
|
169 |
|
170 hypergeometric_cdf -- CDF of the hypergeometric distribution |
|
171 hypergeometric_inv -- Random deviates from hypergeometric distribution |
|
172 hypergeometric_pdf -- PDF of the hypergeometric distribution |
|
173 hypergeometric_rnd -- Random deviates from hypergeometric distribution |
|
174 |
|
175 kolmogorov_smirnov_cdf -- CDF of the Kolmogorov-Smirnov distribution |
|
176 |
|
177 laplace_cdf -- CDF of the Laplace distribution |
|
178 laplace_inv -- Quantile function of the Laplace distribution |
|
179 laplace_pdf -- PDF of the Laplace distribution |
|
180 laplace_rnd -- Random deviates from the Laplace distribution |
|
181 |
|
182 logistic_cdf -- CDF of the logistic distribution |
|
183 logistic_inv -- Quantile function of the logistic distribution |
|
184 logistic_pdf -- PDF of the logistic distribution |
|
185 logistic_rnd -- Random deviates from the logistic distribution |
|
186 |
|
187 lognormal_cdf -- CDF of the log normal distribution |
|
188 lognormal_inv -- Quantile function of the log normal distribution |
|
189 lognormal_pdf -- PDF of the log normal distribution |
|
190 lognormal_rnd -- Random deviates from the log normal distribution |
|
191 |
|
192 normal_cdf -- CDF of the normal distribution |
|
193 normal_inv -- Quantile function of the normal distribution |
|
194 normal_pdf -- PDF of the normal distribution |
|
195 normal_rnd -- Random deviates from the normal distribution |
|
196 |
|
197 pascal_cdf -- CDF of the Pascal (negative binomial) distribution |
|
198 pascal_inv -- Quantile function of the Pascal distribution |
|
199 pascal_pdf -- PDF of the Pascal (negative binomial) distribution |
|
200 pascal_rnd -- Random deviates from the Pascal distribution |
|
201 |
|
202 poisson_cdf -- CDF of the Poisson distribution |
|
203 poisson_inv -- Quantile function of the Poisson distribution |
|
204 poisson_pdf -- PDF of the Poisson distribution |
|
205 poisson_rnd -- Random deviates from the Poisson distribution |
|
206 |
|
207 stdnormal_cdf -- CDF of the standard normal distribution |
|
208 stdnormal_inv -- Quantile function of standard normal distribution |
|
209 stdnormal_pdf -- PDF of the standard normal distribution |
|
210 stdnormal_rnd -- Random deviates from standard normal distribution |
|
211 |
|
212 t_cdf -- CDF of the t distribution |
|
213 t_inv -- Quantile function of the t distribution |
|
214 t_pdf -- PDF of the t distribution |
|
215 t_rnd -- Random deviates from the t distribution |
|
216 |
|
217 uniform_cdf -- CDF of the uniform distribution |
|
218 uniform_inv -- Quantile function of the uniform distribution |
|
219 uniform_pdf -- PDF of the uniform distribution |
|
220 uniform_rnd -- Random deviates from the uniform distribution |
|
221 |
|
222 weibull_cdf -- CDF of the Weibull distribution |
|
223 weibull_inv -- Quantile function of the Weibull distribution |
|
224 weibull_pdf -- PDF of the Weibull distribution |
|
225 weibull_rnd -- Random deviates from the Weibull distribution |
|
226 |
|
227 wiener_rnd -- Simulate a Wiener process |
3192
|
228 |
|
229 In statistics/models (new directory): |
|
230 |
3202
|
231 logistic_regression -- ordinal logistic regression |
|
232 logistic_regression_derivatives -- derivates of log-likelihood |
|
233 in logistic regression |
|
234 logistic_regression_likelihood -- likelihood in logistic regression |
3192
|
235 |
|
236 In statistics/tests (new directory): |
|
237 |
3202
|
238 anova -- one-way analysis of variance |
|
239 bartlett_test -- bartlett test for homogeneity of variances |
|
240 chisquare_test_homogeneity -- chi-square test for homogeneity |
|
241 chisquare_test_independence -- chi-square test for independence |
|
242 cor_test -- test for zero correlation |
|
243 f_test_regression -- test linear hypotheses in linear |
|
244 regression model |
|
245 hotelling_test -- test for mean of a multivariate normal |
|
246 hotelling_test_2 -- compare means of two multivariate normals |
|
247 kolmogorov_smirnov_test -- one-sample Kolmogorov-Smirnov test |
|
248 kolmogorov_smirnov_test_2 -- two-sample Kolmogorov-Smirnov test |
|
249 kruskal_wallis_test -- kruskal-Wallis test |
|
250 manova -- one-way multivariate analysis of variance |
|
251 mcnemar_test -- mcnemar's test for symmetry |
|
252 prop_test_2 -- compare two proportions |
|
253 run_test -- run test for independence |
|
254 sign_test -- sign test |
|
255 t_test -- student's one-sample t test |
|
256 t_test_2 -- student's two-sample t test |
|
257 t_test_regression -- test one linear hypothesis in linear |
|
258 regression model |
|
259 u_test -- mann-Whitney U-test |
|
260 var_test -- f test to compare two variances |
|
261 welch_test -- welch two-sample t test |
|
262 wilcoxon_test -- wilcoxon signed-rank test |
|
263 z_test -- test for mean of a normal sample with |
|
264 known variance |
|
265 z_test_2 -- compare means of two normal samples with |
|
266 known variances |
3192
|
267 |
3202
|
268 * The save command now accepts the option -append to save the |
3192
|
269 variables at the end of the file, leaving the existing contents. |
|
270 |
|
271 * New command-line option --no-history (also available using the |
|
272 single character option -H) inhibits saving command history. |
|
273 |
|
274 * The mkoctfile script now accepts -DDEF options and passes them on |
|
275 to the C and C++ compilers. |
|
276 |
3174
|
277 * Running `make check' should work now before you run `make install', |
|
278 even if you build a copy of Octave that depends on shared versions |
|
279 of the Octave libraries. |
|
280 |
3164
|
281 * For matrices, x(:) now works no matter what the value of |
|
282 do_fortran_indexing is. |
|
283 |
3174
|
284 * New keywords __FILE__ and __LINE__ expand to the name of the file |
|
285 that is being read and the current input line number, respectively. |
|
286 |
2977
|
287 * Octave's expression parser is more general and consistent. It is |
|
288 now possible to access structure elements and index arbitrary |
|
289 values. For example, expressions like |
|
290 |
|
291 my_home_dir = getpwuid (getuid ()) . dir; |
|
292 |
|
293 and |
|
294 |
|
295 svd (x) (1:5) |
|
296 |
|
297 now work. |
|
298 |
2958
|
299 * New built-in variable `print_rhs_assign_val' controls what is |
|
300 printed when an assignment expression is evaluated. If it is |
|
301 zero, the value of the variable on the left hand side (after the |
2983
|
302 assignment) is printed. If it is nonzero, the value of the right |
|
303 hand side (i.e., the result of the expression) is printed. The |
|
304 default value of is zero, so the behavior is the same as in |
|
305 previous versions of Octave. |
2958
|
306 |
2938
|
307 * tmpnam now takes two optional arguments, DIR, and PREFIX. For |
|
308 example, tmpnam ("/foo", "bar-") returns a file name like |
|
309 "/foo/bar-10773baa". If DIR is omitted or empty, the value of the |
|
310 environment variable TMPDIR, or /tmp is used. If PREFIX is |
|
311 omitted, "oct-" is used. |
|
312 |
2958
|
313 * The built-in variable `PWD' has been removed. If you need to get |
2930
|
314 the value of the current working directory, use the pwd() function |
|
315 instead. |
|
316 |
2918
|
317 * New operators. Octave's parser now recognizes the following |
|
318 operators: << >> += -= *= /= .+= .-= .*= ./= &= |= <<= >>=. So |
|
319 far, there are only a few operations defined that actually use |
|
320 them (this should change before 2.1 is released). |
|
321 |
|
322 * New built-in data types: |
|
323 |
|
324 logical: |
|
325 |
|
326 A true value is represented by 1, and false value by 0. |
|
327 Comparison operations like <, <=, ==, >, >=, and != now return |
|
328 logical values. Indexing operations that use zero-one style |
|
329 indexing must now use logical values. You can use the new |
|
330 function logical() to convert a numeric value to a logical |
|
331 value. This avoids the need for the built-in variable |
|
332 `prefer_zero_one_indexing', so it has been removed. Logical |
|
333 values are automatically converted to numeric values where |
|
334 appropriate. |
|
335 |
|
336 file: |
|
337 |
|
338 A file object represents an open Octave stream object. The |
|
339 fopen function now returns a file object instead of an integer. |
|
340 File objects can be converted to integers automatically, and the |
|
341 other functions that work with file ids still work with |
|
342 integers, so this change should be backward compatible. |
|
343 |
|
344 The binary left-shift operator `<<' has been defined to work as |
|
345 in C++ for file objects and built-in types. For example, |
|
346 |
|
347 my_stream = fopen ("foo", "w"); |
|
348 my_stream << "x = " << pi << " marks the spot\n"; |
|
349 |
2922
|
350 writes `x = 3.1416 marks the spot' in the file foo. |
2918
|
351 |
|
352 The built-in variables stdin, stdout, and stderr are now also |
|
353 file objects instead of integers. |
|
354 |
|
355 list: |
|
356 |
|
357 A list is an array of Octave objects. It can be indexed using |
|
358 the normal indexing operator. For example, |
|
359 |
2993
|
360 x = list ([1,2;3,4], 1, "foo"); |
2918
|
361 stdout << x(2) << "\n" |
|
362 1 |
|
363 stdout << x; |
|
364 ( |
|
365 [1] = |
|
366 |
|
367 1 2 |
|
368 3 4 |
|
369 |
|
370 [2] = 1 |
|
371 [3] = foo |
|
372 ) |
|
373 |
|
374 There is currently no special syntax for creating lists; you |
2993
|
375 must use the list function. |
2845
|
376 |
2852
|
377 * Commas in global statements are no longer special. They are now |
|
378 treated as command separators. This removes a conflict in the |
2853
|
379 grammar and is consistent with the way Matlab behaves. The |
|
380 variable `warn_comma_in_global_decl' has been eliminated. |
2852
|
381 |
2845
|
382 * It is now possible to declare static variables that retain their |
|
383 values across function calls. For example, |
|
384 |
|
385 function ncall = f () static n = 0; ncall = ++n; endfunction |
|
386 |
|
387 defines a function that returns the number of times that it has |
|
388 been called. |
2800
|
389 |
2944
|
390 * Within user-defined functions, the new automatic variable `argn' |
|
391 contains the names of the arguments that were passed to the |
|
392 function. For example, |
|
393 |
|
394 function f (...) |
|
395 for i = 1:nargin |
|
396 stdout << "argn(" << i << ") = `" << deblank (argn(i,:)) \ |
|
397 << "' and its value is " << va_arg () << "\n"; |
|
398 endfor |
|
399 endfunction |
|
400 f (1+2, "foo", sin (pi/2)) |
|
401 |
|
402 prints |
|
403 |
|
404 argn(1) = `1 + 2' and its value is 3 |
|
405 argn(2) = `"foo"' and its value is foo |
|
406 argn(3) = `sin (pi)' and its value is 1 |
|
407 |
|
408 on the standard output stream. If nargin is zero, argn is not defined. |
2800
|
409 * Functions like quad, fsolve, and lsode can take either a function |
|
410 name or a simple function body as a string. For example, |
|
411 |
|
412 quad ("sqrt (x)", 0, 1) |
|
413 |
|
414 is equivalent to |
|
415 |
|
416 function y = f (x) y = sqrt (x); endfunction |
|
417 quad ("f", 0, 1) |
|
418 |
2815
|
419 * If the argument to eig() is symmetric, Octave uses the specialized |
|
420 Lapack subroutine for symmetric matrices for a significant |
|
421 increase in performance. |
|
422 |
2851
|
423 * If the argument to lsode that names the user-supplied function is |
|
424 a 2-element string array, the second element is taken as the name |
|
425 of the Jacobian function. The named function should have the |
|
426 following form: |
|
427 |
|
428 JAC = f (X, T) |
|
429 |
|
430 where JAC is the Jacobian matrix of partial derivatives of the |
|
431 right-hand-side functions that define the set of differential |
|
432 equations with respect to the state vector X. |
|
433 |
3107
|
434 * Global variables are now initialized to the empty matrix, for |
|
435 compatibility with Matlab. |
|
436 |
|
437 * Explicit initialization of global variables only happens once. |
|
438 For example, after the following statements are evaluated, g still |
|
439 has the value 1. |
|
440 |
|
441 global g = 1 |
|
442 global g = 2 |
|
443 |
|
444 This is useful for initializing global variables that are used to |
|
445 maintain state information that is shared among several functions. |
|
446 |
2930
|
447 * Structure elements completion on the command line actually works |
|
448 now. |
|
449 |
3105
|
450 * The new built-in variable `fixed_point_format' controls whether |
|
451 Octave uses a scaled fixed-point format for displaying matrices. |
|
452 The default value is 0 unless you use --traditional. |
|
453 |
|
454 * The function sumsq now computes sum (x .* conj (x)) for complex values. |
|
455 |
3131
|
456 * The new built-in variable max_recursion_depth allows you to |
|
457 prevent Octave from attempting infinite recursion. The default |
|
458 value is 256. |
|
459 |
3174
|
460 * Octave now uses kpathsea 3.2. |
3125
|
461 |
2930
|
462 * New configure option, --enable-readline. |
|
463 |
3035
|
464 * New configure option, --enable-static. |
|
465 |
|
466 Summary of changes for version 2.0.7: |
|
467 ------------------------------------ |
|
468 |
|
469 This is a bug-fixing release. There are no new user-visible features. |
|
470 |
|
471 Summary of changes for version 2.0.6: |
|
472 ------------------------------------ |
|
473 |
|
474 This is primarily a bug-fixing release. There are only a few new |
|
475 user-visible features. |
|
476 |
|
477 * The new built-in variable default_eval_print_flag controls whether |
|
478 Octave prints the results of commands executed by eval() that do |
|
479 not end with semicolons. The default is 1. |
|
480 |
|
481 * The new built-in constant OCTAVE_HOME specifies the top-level |
|
482 directory where Octave is installed. |
|
483 |
|
484 * Octave no longer includes functions to work with NPSOL or QPSOL, |
|
485 because they are not free software. |
|
486 |
3174
|
487 * The new built-in variable called kluge_procbuf_delay specifies the |
|
488 number of microseconds to delay in the parent process after |
|
489 forking. By default on gnu-win32 systems, it's set to 500000 (1/2 |
|
490 second). On other systems, the default value is 0. Delaying for |
|
491 a short time in the parent after forking seems to avoid problems |
|
492 in which communicating with subprocesses via pipes would sometimes |
|
493 cause Octave to hang. I doubt that the delay is really the right |
|
494 solution. If anyone has a better idea, I'd love to hear it. |
|
495 |
2745
|
496 Summary of changes for version 2.0.5: |
|
497 ------------------------------------ |
|
498 |
2767
|
499 * A `switch' statement is now available. See the Statements chapter |
|
500 in the manual for details. |
|
501 |
2745
|
502 * Commands like ls, save, and cd may now also be used as formal |
|
503 parameters for functions. |
|
504 |
|
505 * More tests. |
|
506 |
2702
|
507 Summary of changes for version 2.0.4: |
|
508 ------------------------------------ |
|
509 |
|
510 * It is now possible to use commands like ls, save, and cd as simple |
|
511 variable names. They still cannot be used as formal parameters |
|
512 for functions, or as the names of structure variables. Failed |
|
513 assignments leave them undefined (you can recover the orginal |
2704
|
514 function definition using clear). |
|
515 |
|
516 * Is is now possible to invoke commands like ls, save, and cd as |
|
517 normal functions (for example, load ("foo", "x", "y", "z")). |
2702
|
518 |
2666
|
519 Summary of changes for version 2.0.3: |
|
520 ------------------------------------ |
|
521 |
|
522 * The manual has been completely revised and now corresponds much |
|
523 more closely to the features of the current version. |
|
524 |
|
525 * The return value for assignment expressions is now the RHS since |
|
526 that is more consistent with the way other programming languages |
|
527 work. However, Octave still prints the entire LHS value so that |
|
528 |
|
529 x = zeros (1, 2); |
|
530 x(2) = 1 |
|
531 |
|
532 still prints |
|
533 |
|
534 x = |
|
535 |
|
536 0 1 |
|
537 |
|
538 but an assignment like |
|
539 |
|
540 z = x(2) = 1 |
|
541 |
|
542 sets z to 1 (not [ 0, 1 ] as in previous versions of Octave). |
|
543 |
2683
|
544 * It is now much easier to make binary distributions. See the |
|
545 Binary Distributions section of the manual for more details. |
|
546 |
2615
|
547 Summary of changes for version 2.0.2: |
2613
|
548 ------------------------------------ |
|
549 |
2621
|
550 * Octave now stops executing commands from a script file if an error |
|
551 is encountered. |
|
552 |
|
553 * The return, and break commands now cause Octave to quit executing |
|
554 commands from script files. When used in invalid contexts, the |
|
555 break, continue, and return commands are now simply ignored |
|
556 instead of producing parse errors. |
|
557 |
2613
|
558 * size ("") is now [0, 0]. |
|
559 |
2634
|
560 * New functions: |
|
561 |
|
562 sleep -- pause execution for a specified number of seconds |
|
563 usleep -- pause execution for a specified number of microseconds |
|
564 |
2452
|
565 Summary of changes for version 2.0: |
|
566 ---------------------------------- |
|
567 |
2520
|
568 * The set and show commands for setting and displaying gnuplot |
|
569 parameters have been replaced by gset and gshow. This change will |
|
570 probably break lots of things, but it is necessary to allow for |
|
571 compatibility with the Matlab graphics and GUI commands in a |
|
572 future version of Octave. (For now, the old set and show commands |
|
573 do work, but they print an annoying warning message to try to get |
|
574 people to switch to using gset.) |
|
575 |
2581
|
576 * Octave has been mostly ported to Windows NT and Windows 95 using |
|
577 the beta 17 release of the Cygnus GNU-WIN32 tools. Not everything |
|
578 works, but it is usable. See the file README.WINDOWS for more |
|
579 information. |
|
580 |
2580
|
581 * Dynamic linking works on more systems using dlopen() and friends |
|
582 (most modern Unix systems) or shl_load() and friends (HP/UX |
|
583 systems). A simple example is provided in examples/hello.cc. |
|
584 For this feature to work, you must configure Octave with |
|
585 --enable-shared. You may also need to have a shared-library |
|
586 version of libg++ and libstdc++. |
|
587 |
2452
|
588 * New data types can be added to Octave by writing a C++ class. On |
|
589 systems that support dynamic linking, new data types can be added |
|
590 to an already running Octave binary. A simple example appears in |
|
591 the file examples/make_int.cc. Other examples are the standard |
|
592 Octave data types defined in the files src/ov*.{h,cc} and |
2580
|
593 src/op-*.cc. |
2452
|
594 |
|
595 * The configure option --enable-bounds-check turns on bounds |
|
596 checking on element references for Octave's internal array and |
|
597 matrix classes. It's enabled by default. To disable this |
|
598 feature, configure Octave with --disable-bounds-check. |
|
599 |
|
600 * The C-style I/O functions (fopen, fprintf, etc.) have been |
|
601 rewritten to be more compatible with Matlab. The fputs function |
|
602 has also been added. Usage of the *printf functions that was |
|
603 allowed in previous versions of Octave should still work. |
|
604 However, there is no way to make the new versions of the *scanf |
|
605 functions compatible with Matlab *and* previous versions of |
|
606 Octave. An optional argument to the *scanf functions is now |
|
607 available to make them behave in a way that is compatible with |
|
608 previous versions of Octave. |
|
609 |
2511
|
610 * Octave can now read files that contain columns of numbers only, |
|
611 with no header information. The name of the loaded variable is |
|
612 constructed from the file name. Each line in the file must have |
|
613 the same number of elements. |
|
614 |
2452
|
615 * The interface to the pager has changed. The new built-in variable |
|
616 `page_output_immediately' controls when Octave sends output to the |
|
617 pager. If it is nonzero, Octave sends output to the pager as soon |
|
618 as it is available. Otherwise, Octave buffers its output and |
|
619 waits until just before the prompt is printed to flush it to the |
|
620 pager. |
|
621 |
|
622 * Expressions of the form |
|
623 |
|
624 A(i,j) = x |
|
625 |
|
626 where X is a scalar and the indices i and j define a matrix of |
|
627 elements now work as you would expect rather than giving an error. |
|
628 I am told that this is how Matlab 5.0 will behave when it is |
|
629 released. |
|
630 |
|
631 * Indexing of character strings now works. |
|
632 |
|
633 * The echo command has been implemented. |
|
634 |
|
635 * The document command is now a regular function. |
|
636 |
|
637 * New method for handling errors: |
|
638 |
|
639 try |
|
640 BODY |
|
641 catch |
|
642 CLEANUP |
|
643 end_try_catch |
|
644 |
|
645 Where BODY and CLEANUP are both optional and may contain any |
|
646 Octave expressions or commands. The statements in CLEANUP are |
|
647 only executed if an error occurs in BODY. |
|
648 |
|
649 No warnings or error messages are printed while BODY is |
|
650 executing. If an error does occur during the execution of BODY, |
|
651 CLEANUP can access the text of the message that would have been |
|
652 printed in the builtin constant __error_text__. This is the same |
|
653 as eval (TRY, CATCH) (which may now also use __error_text__) but |
|
654 it is more efficient since the commands do not need to be parsed |
|
655 each time the TRY and CATCH statements are evaluated. |
|
656 |
|
657 * Octave no longer parses the help command by grabbing everything |
|
658 after the keyword `help' until a newline character is read. To |
|
659 get help for `;' or `,', now, you need to use the command |
|
660 `help semicolon' or `help comma'. |
|
661 |
|
662 * Octave's parser now does some simple constant folding. This means |
|
663 that expressions like 3*i are now evaluated only once, when a |
|
664 function is compiled, and the right hand side of expressions like |
|
665 a = [1,2;3,4] are treated as true matrix constants rather than |
|
666 lists of elements which must be evaluated each time they are |
|
667 needed. |
|
668 |
|
669 * Built-in variables that can take values of "true" and "false" can |
|
670 now also be set to any nonzero scalar value to indicate "true", |
|
671 and 0 to indicate "false". |
|
672 |
|
673 * New built-in variables `history_file', `history_size', and |
|
674 `saving_history'. |
|
675 |
|
676 * New built-in variable `string_fill_char' specifies the character |
|
677 to fill with when creating arrays of strings. |
|
678 |
|
679 * If the new built-in variable `gnuplot_has_frames' is nonzero, |
|
680 Octave assumes that your copy of gnuplot includes support for |
|
681 multiple plot windows when using X11. |
|
682 |
|
683 If the new built-in variable `gnuplot_has_multiplot' is nonzero, |
|
684 Octave assumes that your copy of gnuplot has the multiplot support |
|
685 that is included in recent 3.6beta releases. |
|
686 |
|
687 The initial values of these variables are determined by configure, |
|
688 but can be changed in your startup script or at the command line |
|
689 in case configure got it wrong, or if you upgrade your gnuplot |
|
690 installation. |
|
691 |
|
692 * The new plot function `figure' allows multiple plot windows when |
|
693 using newer versions of gnuplot with X11. |
|
694 |
|
695 * Octave now notices when the plotter has exited unexpectedly. |
|
696 |
|
697 * New built-in variable `warn_missing_semicolon'. If nonzero, Octave |
|
698 will warn when statements in function definitions don't end in |
|
699 semicolons. The default value is 0. |
|
700 |
|
701 * Octave now attempts to continue after floating point exceptions |
|
702 or out-of-memory errors. |
|
703 |
|
704 * If Octave crashes, it now attempts to save all user-defined |
|
705 variables in a file named `octave-core' in the current directory |
|
706 before exiting. |
|
707 |
|
708 * It is now possible to get the values of individual option settings |
|
709 for the dassl, fsolve, lsode, npsol, qpsol, and quad functions |
|
710 using commands like |
|
711 |
|
712 dassl_reltol = dassl_options ("relative tolerance"); |
|
713 |
|
714 * The svd() function no longer computes the left and right singular |
|
715 matrices unnecessarily. This can significantly improve |
|
716 performance for large matrices if you are just looking for the |
|
717 singular values. |
|
718 |
|
719 * The filter() function is now a built-in function. |
|
720 |
|
721 * New function randn() returns a pseudo-random number from a normal |
|
722 distribution. The rand() and randn() functions have separate |
|
723 seeds and generators. |
|
724 |
|
725 * Octave's command-line arguments are now available in the built-in |
|
726 variable `argv'. The program name is also available in the |
|
727 variables `program_invocation_name' and `program_name'. If |
|
728 executing a script from the command line (e.g., octave foo.m) or |
|
729 using the `#! /bin/octave' hack, the program name is set to the |
|
730 name of the script. |
|
731 |
|
732 * New built-in variable `completion_append_char' used as the |
|
733 character to append to successful command-line completion |
|
734 attempts. The default is " " (a single space). |
|
735 |
|
736 * Octave now uses a modified copy of the readline library from |
|
737 version 1.14.5 of GNU bash. |
|
738 |
|
739 * In prompt strings, `\H' expands to the whole host name. |
|
740 |
|
741 * New built-in variable `beep_on_error'. If nonzero, Octave will try |
|
742 to ring your terminal's bell before printing an error message. |
|
743 The default value is 0. |
|
744 |
2554
|
745 * For functions defined from files, the type command now prints the |
|
746 text of the file. You can still get the text reconstructed from |
|
747 the parse tree by using the new option -t (-transformed). |
|
748 |
2452
|
749 * New command-line argument --traditional sets the following |
|
750 preference variables for compatibility with Matlab: |
|
751 |
|
752 PS1 = ">> " |
|
753 PS2 = "" |
|
754 beep_on_error = 1 |
|
755 default_save_format = "mat-binary" |
|
756 define_all_return_values = 1 |
|
757 do_fortran_indexing = 1 |
|
758 empty_list_elements_ok = 1 |
|
759 implicit_str_to_num_ok = 1 |
|
760 ok_to_lose_imaginary_part = 1 |
|
761 page_screen_output = 0 |
|
762 prefer_column_vectors = 0 |
|
763 prefer_zero_one_indexing = 1 |
|
764 print_empty_dimensions = 0 |
|
765 treat_neg_dim_as_zero = 1 |
|
766 warn_function_name_clash = 0 |
|
767 whitespace_in_literal_matrix = "traditional" |
|
768 |
|
769 * New functions: |
|
770 |
|
771 readdir -- returns names of files in directory as array of strings |
|
772 mkdir -- create a directory |
|
773 rmdir -- remove a directory |
|
774 rename -- rename a file |
|
775 unlink -- delete a file |
|
776 umask -- set permission mask for file creation |
|
777 stat -- get information about a file |
|
778 lstat -- get information about a symbolic link |
2496
|
779 glob -- perform filename globbing |
|
780 fnmatch -- match strings with filename globbing patterns |
2452
|
781 more -- turn the pager on or off |
|
782 gammaln -- alias for lgamma |
|
783 |
|
784 * New audio functions from Andreas Weingessel |
|
785 <Andreas.Weingessel@ci.tuwien.ac.at>. |
|
786 |
2458
|
787 lin2mu -- linear to mu-law encoding |
|
788 loadaudio -- load an audio file to a vector |
|
789 mu2lin -- mu-law to linear encoding |
|
790 playaudio -- play an audio file |
|
791 record -- record sound and store in vector |
|
792 saveaudio -- save a vector as an audio file |
|
793 setaudio -- executes mixer shell command |
2452
|
794 |
|
795 * New plotting functions from Vinayak Dutt. Ones dealing with |
|
796 multiple plots on one page require features from gnuplot 3.6beta |
|
797 (or later). |
|
798 |
|
799 bottom_title -- put title at the bottom of the plot |
|
800 mplot -- multiplot version of plot |
|
801 multiplot -- switch multiple-plot mode on or off |
|
802 oneplot -- return to one plot per page |
|
803 plot_border -- put a border around plots |
|
804 subplot -- position multiple plots on a single page |
|
805 subwindow -- set subwindow position for next plot |
|
806 top_title -- put title at the top of the plot |
|
807 zlabel -- put a label on the z-axis |
|
808 |
|
809 * New string functions |
|
810 |
|
811 bin2dec -- convert a string of ones and zeros to an integer |
|
812 blanks -- create a string of blanks |
|
813 deblank -- delete trailing blanks |
|
814 dec2bin -- convert an integer to a string of ones and zeros |
|
815 dec2hex -- convert an integer to a hexadecimal string |
|
816 findstr -- locate occurrences of one string in another |
|
817 hex2dec -- convert a hexadecimal string to an integer |
|
818 index -- return position of first occurrence a string in another |
|
819 rindex -- return position of last occurrence a string in another |
|
820 split -- divide one string into pieces separated by another |
|
821 str2mat -- create a string matrix from a list of strings |
|
822 strrep -- replace substrings in a string |
|
823 substr -- extract a substring |
|
824 |
|
825 The following functions return a matrix of ones and zeros. |
|
826 Elements that are nonzero indicate that the condition was true for |
|
827 the corresponding character in the string array. |
|
828 |
|
829 isalnum -- letter or a digit |
|
830 isalpha -- letter |
|
831 isascii -- ascii |
|
832 iscntrl -- control character |
|
833 isdigit -- digit |
|
834 isgraph -- printable (but not space character) |
|
835 islower -- lower case |
|
836 isprint -- printable (including space character) |
|
837 ispunct -- punctuation |
|
838 isspace -- whitespace |
|
839 isupper -- upper case |
|
840 isxdigit -- hexadecimal digit |
|
841 |
|
842 These functions return new strings. |
|
843 |
2458
|
844 tolower -- convert to lower case |
|
845 toupper -- convert to upper case |
2452
|
846 |
|
847 * New function, fgetl. Both fgetl and fgets accept an optional |
|
848 second argument that specifies a maximum number of characters to |
|
849 read, and the function fgets is now compatible with Matlab. |
|
850 |
|
851 * Printing in hexadecimal format now works (format hex). It is also |
|
852 possible to print the internal bit representation of a value |
|
853 (format bit). Note that these formats are only implemented for |
|
854 numeric values. |
|
855 |
|
856 * Additional structure features: |
|
857 |
|
858 -- Name completion now works for structures. |
|
859 |
|
860 -- Values and names of structure elements are now printed by |
|
861 default. The new built-in variable `struct_levels_to_print' |
|
862 controls the depth of nested structures to print. The default |
|
863 value is 2. |
|
864 |
|
865 -- New functions: |
|
866 |
|
867 struct_contains (S, NAME) -- returns 1 if S is a structure with |
|
868 element NAME; otherwise returns 0. |
|
869 |
|
870 struct_elements (S) -- returns the names of all elements |
|
871 of structure S in an array of strings. |
|
872 |
|
873 * New io/subprocess functions: |
|
874 |
2458
|
875 fputs -- write a string to a file with no formatting |
|
876 popen2 -- start a subprocess with 2-way communication |
|
877 mkfifo -- create a FIFO special file |
|
878 popen -- open a pipe to a subprocess |
|
879 pclose -- close a pipe from a subprocess |
|
880 waitpid -- check the status of or wait for subprocesses |
2452
|
881 |
|
882 * New time functions: |
|
883 |
2458
|
884 asctime -- format time structure according to local format |
|
885 ctime -- equivalent to `asctime (localtime (TMSTRUCT))' |
|
886 gmtime -- return time structure corresponding to UTC |
|
887 localtime -- return time structure corresponding to local time zone |
|
888 strftime -- print given time structure using specified format |
|
889 time -- return current time |
2452
|
890 |
|
891 The `clock' and `date' functions are now implemented in M-files |
|
892 using these basic functions. |
|
893 |
|
894 * Access to additional Unix system calls: |
|
895 |
|
896 dup2 -- duplicate a file descriptor |
|
897 exec -- replace current process with a new process |
|
898 fcntl -- control open file descriptors |
|
899 fork -- create a copy of the current process |
|
900 getpgrp -- return the process group id of the current process |
|
901 getpid -- return the process id of the current process |
|
902 getppid -- return the process id of the parent process |
2475
|
903 getuid -- return the real user id of the current process |
|
904 getgid -- return the real group id of the current process |
|
905 geteuid -- return the effective user id of the current process |
|
906 getegid -- return the effective group id of the current process |
2452
|
907 pipe -- create an interprocess channel |
|
908 |
|
909 * Other new functions: |
|
910 |
2554
|
911 commutation_matrix -- compute special matrix form |
|
912 duplication_matrix -- compute special matrix form |
|
913 common_size.m -- bring arguments to a common size |
|
914 completion_matches -- perform command completion on string |
2458
|
915 tilde_expand -- perform tilde expansion on string |
2554
|
916 |
|
917 meshgrid -- compatible with Matlab's meshgrid function |
|
918 tmpnam -- replaces octave_tmp_file_name |
|
919 atexit -- register functions to be called when Octave exits |
|
920 putenv -- define an environment variable |
|
921 bincoeff -- compute binomial coefficients |
|
922 nextpow2 -- compute the next power of 2 greater than a number |
|
923 detrend -- remove a best fit polynomial from data |
|
924 erfinv -- inverse error function |
|
925 shift -- perform a circular shift on the elements of a matrix |
|
926 pow2 -- compute 2 .^ x |
|
927 log2 -- compute base 2 logarithms |
|
928 diff -- compute differences of matrix elements |
|
929 vech -- stack columns of a matrix below the diagonal |
|
930 vec -- stack columns of a matrix to form a vector |
|
931 xor -- compute exclusive or |
2452
|
932 |
2459
|
933 * Functions for getting info from the password database on Unix systems: |
|
934 |
|
935 getpwent -- read entry from password-file stream, opening if necessary |
|
936 getpwuid -- search for password entry with matching user ID |
|
937 getpwnam -- search for password entry with matching username |
|
938 setpwent -- rewind the password-file stream |
|
939 endpwent -- close the password-file stream |
|
940 |
2484
|
941 * Functions for getting info from the group database on Unix systems: |
|
942 |
|
943 getgrent -- read entry from group-file stream, opening if necessary |
|
944 getgrgid -- search for group entry with matching group ID |
|
945 getgrnam -- search for group entry with matching group name |
|
946 setgrent -- rewind the pgroup-file stream |
|
947 endgrent -- close the group-file stream |
|
948 |
2452
|
949 * The New function octave_config_info returns a structure containing |
|
950 information about how Octave was configured and compiled. |
|
951 |
|
952 * New function getrusage returns a structure containing system |
|
953 resource usage statistics. The `cputime' function is now defined |
|
954 in an M-file using getrusage. |
|
955 |
|
956 * The info reader is now a separate binary that runs as a |
|
957 subprocess. You still need the info reader distributed with |
|
958 Octave though, because there are some new command-line arguments |
|
959 that are not yet available in the public release of Info. |
|
960 |
|
961 * There is a new built-in variable, INFO_PROGRAM, which is used as |
|
962 the name of the info program to run. Its initial value is |
|
963 $OCTAVE_HOME/lib/octave/VERSION/exec/ARCH/info, but that value can |
|
964 be overridden by the environment variable OCTAVE_INFO_PROGRAM, or |
|
965 the command line argument --info-program NAME, or by setting the |
|
966 value of INFO_PROGRAM in a startup script. |
|
967 |
|
968 * There is a new built-in variable, EXEC_PATH, which is used as |
|
969 the list of directories to search when executing subprograms. Its |
|
970 initial value is taken from the environment variable |
|
971 OCTAVE_EXEC_PATH (if it exists) or PATH, but that value can be |
|
972 overridden by the the command line argument --exec-path PATH, or |
|
973 by setting the value of EXEC_PATH in a startup script. If the |
|
974 EXEC_PATH begins (ends) with a colon, the directories |
|
975 $OCTAVE_HOME/lib/octave/VERSION/exec/ARCH and $OCTAVE_HOME/bin are |
|
976 prepended (appended) to EXEC_PATH (if you don't specify a value |
|
977 for EXEC_PATH explicitly, these special directories are prepended |
|
978 to your PATH). |
|
979 |
|
980 * If it is present, Octave will now use an `ls-R' database file to |
|
981 speed up recursive path searching. Octave looks for a file called |
|
982 ls-R in the directory specified by the environment variable |
|
983 OCTAVE_DB_DIR. If that is not set but the environment variable |
|
984 OCTAVE_HOME is set, Octave looks in $OCTAVE_HOME/lib/octave. |
|
985 Otherwise, Octave looks in the directory $datadir/octave (normally |
|
986 /usr/local/lib/octave). |
|
987 |
|
988 * New examples directory. |
|
989 |
|
990 * There is a new script, mkoctfile, that can be used to create .oct |
|
991 files suitable for dynamic linking. |
|
992 |
|
993 * Many more bug fixes. |
|
994 |
|
995 * ChangeLogs are now kept in each subdirectory. |
|
996 |
|
997 See NEWS.1 for old news. |