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