2800
|
1 Summary of changes for version 2.0.6: |
|
2 ------------------------------------ |
|
3 |
|
4 * Functions like quad, fsolve, and lsode can take either a function |
|
5 name or a simple function body as a string. For example, |
|
6 |
|
7 quad ("sqrt (x)", 0, 1) |
|
8 |
|
9 is equivalent to |
|
10 |
|
11 function y = f (x) y = sqrt (x); endfunction |
|
12 quad ("f", 0, 1) |
|
13 |
2815
|
14 * If the argument to eig() is symmetric, Octave uses the specialized |
|
15 Lapack subroutine for symmetric matrices for a significant |
|
16 increase in performance. |
|
17 |
2745
|
18 Summary of changes for version 2.0.5: |
|
19 ------------------------------------ |
|
20 |
2767
|
21 * A `switch' statement is now available. See the Statements chapter |
|
22 in the manual for details. |
|
23 |
2745
|
24 * Commands like ls, save, and cd may now also be used as formal |
|
25 parameters for functions. |
|
26 |
|
27 * More tests. |
|
28 |
2702
|
29 Summary of changes for version 2.0.4: |
|
30 ------------------------------------ |
|
31 |
|
32 * It is now possible to use commands like ls, save, and cd as simple |
|
33 variable names. They still cannot be used as formal parameters |
|
34 for functions, or as the names of structure variables. Failed |
|
35 assignments leave them undefined (you can recover the orginal |
2704
|
36 function definition using clear). |
|
37 |
|
38 * Is is now possible to invoke commands like ls, save, and cd as |
|
39 normal functions (for example, load ("foo", "x", "y", "z")). |
2702
|
40 |
2666
|
41 Summary of changes for version 2.0.3: |
|
42 ------------------------------------ |
|
43 |
|
44 * The manual has been completely revised and now corresponds much |
|
45 more closely to the features of the current version. |
|
46 |
|
47 * The return value for assignment expressions is now the RHS since |
|
48 that is more consistent with the way other programming languages |
|
49 work. However, Octave still prints the entire LHS value so that |
|
50 |
|
51 x = zeros (1, 2); |
|
52 x(2) = 1 |
|
53 |
|
54 still prints |
|
55 |
|
56 x = |
|
57 |
|
58 0 1 |
|
59 |
|
60 but an assignment like |
|
61 |
|
62 z = x(2) = 1 |
|
63 |
|
64 sets z to 1 (not [ 0, 1 ] as in previous versions of Octave). |
|
65 |
2683
|
66 * It is now much easier to make binary distributions. See the |
|
67 Binary Distributions section of the manual for more details. |
|
68 |
2615
|
69 Summary of changes for version 2.0.2: |
2613
|
70 ------------------------------------ |
|
71 |
2621
|
72 * Octave now stops executing commands from a script file if an error |
|
73 is encountered. |
|
74 |
|
75 * The return, and break commands now cause Octave to quit executing |
|
76 commands from script files. When used in invalid contexts, the |
|
77 break, continue, and return commands are now simply ignored |
|
78 instead of producing parse errors. |
|
79 |
2613
|
80 * size ("") is now [0, 0]. |
|
81 |
2634
|
82 * New functions: |
|
83 |
|
84 sleep -- pause execution for a specified number of seconds |
|
85 usleep -- pause execution for a specified number of microseconds |
|
86 |
2452
|
87 Summary of changes for version 2.0: |
|
88 ---------------------------------- |
|
89 |
2520
|
90 * The set and show commands for setting and displaying gnuplot |
|
91 parameters have been replaced by gset and gshow. This change will |
|
92 probably break lots of things, but it is necessary to allow for |
|
93 compatibility with the Matlab graphics and GUI commands in a |
|
94 future version of Octave. (For now, the old set and show commands |
|
95 do work, but they print an annoying warning message to try to get |
|
96 people to switch to using gset.) |
|
97 |
2581
|
98 * Octave has been mostly ported to Windows NT and Windows 95 using |
|
99 the beta 17 release of the Cygnus GNU-WIN32 tools. Not everything |
|
100 works, but it is usable. See the file README.WINDOWS for more |
|
101 information. |
|
102 |
2580
|
103 * Dynamic linking works on more systems using dlopen() and friends |
|
104 (most modern Unix systems) or shl_load() and friends (HP/UX |
|
105 systems). A simple example is provided in examples/hello.cc. |
|
106 For this feature to work, you must configure Octave with |
|
107 --enable-shared. You may also need to have a shared-library |
|
108 version of libg++ and libstdc++. |
|
109 |
2452
|
110 * New data types can be added to Octave by writing a C++ class. On |
|
111 systems that support dynamic linking, new data types can be added |
|
112 to an already running Octave binary. A simple example appears in |
|
113 the file examples/make_int.cc. Other examples are the standard |
|
114 Octave data types defined in the files src/ov*.{h,cc} and |
2580
|
115 src/op-*.cc. |
2452
|
116 |
|
117 * The configure option --enable-bounds-check turns on bounds |
|
118 checking on element references for Octave's internal array and |
|
119 matrix classes. It's enabled by default. To disable this |
|
120 feature, configure Octave with --disable-bounds-check. |
|
121 |
|
122 * The C-style I/O functions (fopen, fprintf, etc.) have been |
|
123 rewritten to be more compatible with Matlab. The fputs function |
|
124 has also been added. Usage of the *printf functions that was |
|
125 allowed in previous versions of Octave should still work. |
|
126 However, there is no way to make the new versions of the *scanf |
|
127 functions compatible with Matlab *and* previous versions of |
|
128 Octave. An optional argument to the *scanf functions is now |
|
129 available to make them behave in a way that is compatible with |
|
130 previous versions of Octave. |
|
131 |
2511
|
132 * Octave can now read files that contain columns of numbers only, |
|
133 with no header information. The name of the loaded variable is |
|
134 constructed from the file name. Each line in the file must have |
|
135 the same number of elements. |
|
136 |
2452
|
137 * The interface to the pager has changed. The new built-in variable |
|
138 `page_output_immediately' controls when Octave sends output to the |
|
139 pager. If it is nonzero, Octave sends output to the pager as soon |
|
140 as it is available. Otherwise, Octave buffers its output and |
|
141 waits until just before the prompt is printed to flush it to the |
|
142 pager. |
|
143 |
|
144 * Expressions of the form |
|
145 |
|
146 A(i,j) = x |
|
147 |
|
148 where X is a scalar and the indices i and j define a matrix of |
|
149 elements now work as you would expect rather than giving an error. |
|
150 I am told that this is how Matlab 5.0 will behave when it is |
|
151 released. |
|
152 |
|
153 * Indexing of character strings now works. |
|
154 |
|
155 * The echo command has been implemented. |
|
156 |
|
157 * The document command is now a regular function. |
|
158 |
|
159 * New method for handling errors: |
|
160 |
|
161 try |
|
162 BODY |
|
163 catch |
|
164 CLEANUP |
|
165 end_try_catch |
|
166 |
|
167 Where BODY and CLEANUP are both optional and may contain any |
|
168 Octave expressions or commands. The statements in CLEANUP are |
|
169 only executed if an error occurs in BODY. |
|
170 |
|
171 No warnings or error messages are printed while BODY is |
|
172 executing. If an error does occur during the execution of BODY, |
|
173 CLEANUP can access the text of the message that would have been |
|
174 printed in the builtin constant __error_text__. This is the same |
|
175 as eval (TRY, CATCH) (which may now also use __error_text__) but |
|
176 it is more efficient since the commands do not need to be parsed |
|
177 each time the TRY and CATCH statements are evaluated. |
|
178 |
|
179 * Octave no longer parses the help command by grabbing everything |
|
180 after the keyword `help' until a newline character is read. To |
|
181 get help for `;' or `,', now, you need to use the command |
|
182 `help semicolon' or `help comma'. |
|
183 |
|
184 * Octave's parser now does some simple constant folding. This means |
|
185 that expressions like 3*i are now evaluated only once, when a |
|
186 function is compiled, and the right hand side of expressions like |
|
187 a = [1,2;3,4] are treated as true matrix constants rather than |
|
188 lists of elements which must be evaluated each time they are |
|
189 needed. |
|
190 |
|
191 * Built-in variables that can take values of "true" and "false" can |
|
192 now also be set to any nonzero scalar value to indicate "true", |
|
193 and 0 to indicate "false". |
|
194 |
|
195 * New built-in variables `history_file', `history_size', and |
|
196 `saving_history'. |
|
197 |
|
198 * New built-in variable `string_fill_char' specifies the character |
|
199 to fill with when creating arrays of strings. |
|
200 |
|
201 * If the new built-in variable `gnuplot_has_frames' is nonzero, |
|
202 Octave assumes that your copy of gnuplot includes support for |
|
203 multiple plot windows when using X11. |
|
204 |
|
205 If the new built-in variable `gnuplot_has_multiplot' is nonzero, |
|
206 Octave assumes that your copy of gnuplot has the multiplot support |
|
207 that is included in recent 3.6beta releases. |
|
208 |
|
209 The initial values of these variables are determined by configure, |
|
210 but can be changed in your startup script or at the command line |
|
211 in case configure got it wrong, or if you upgrade your gnuplot |
|
212 installation. |
|
213 |
|
214 * The new plot function `figure' allows multiple plot windows when |
|
215 using newer versions of gnuplot with X11. |
|
216 |
|
217 * Octave now notices when the plotter has exited unexpectedly. |
|
218 |
|
219 * New built-in variable `warn_missing_semicolon'. If nonzero, Octave |
|
220 will warn when statements in function definitions don't end in |
|
221 semicolons. The default value is 0. |
|
222 |
|
223 * Octave now attempts to continue after floating point exceptions |
|
224 or out-of-memory errors. |
|
225 |
|
226 * If Octave crashes, it now attempts to save all user-defined |
|
227 variables in a file named `octave-core' in the current directory |
|
228 before exiting. |
|
229 |
|
230 * It is now possible to get the values of individual option settings |
|
231 for the dassl, fsolve, lsode, npsol, qpsol, and quad functions |
|
232 using commands like |
|
233 |
|
234 dassl_reltol = dassl_options ("relative tolerance"); |
|
235 |
|
236 * The svd() function no longer computes the left and right singular |
|
237 matrices unnecessarily. This can significantly improve |
|
238 performance for large matrices if you are just looking for the |
|
239 singular values. |
|
240 |
|
241 * The filter() function is now a built-in function. |
|
242 |
|
243 * New function randn() returns a pseudo-random number from a normal |
|
244 distribution. The rand() and randn() functions have separate |
|
245 seeds and generators. |
|
246 |
|
247 * Octave's command-line arguments are now available in the built-in |
|
248 variable `argv'. The program name is also available in the |
|
249 variables `program_invocation_name' and `program_name'. If |
|
250 executing a script from the command line (e.g., octave foo.m) or |
|
251 using the `#! /bin/octave' hack, the program name is set to the |
|
252 name of the script. |
|
253 |
|
254 * New built-in variable `completion_append_char' used as the |
|
255 character to append to successful command-line completion |
|
256 attempts. The default is " " (a single space). |
|
257 |
|
258 * Octave now uses a modified copy of the readline library from |
|
259 version 1.14.5 of GNU bash. |
|
260 |
|
261 * In prompt strings, `\H' expands to the whole host name. |
|
262 |
|
263 * New built-in variable `beep_on_error'. If nonzero, Octave will try |
|
264 to ring your terminal's bell before printing an error message. |
|
265 The default value is 0. |
|
266 |
2554
|
267 * For functions defined from files, the type command now prints the |
|
268 text of the file. You can still get the text reconstructed from |
|
269 the parse tree by using the new option -t (-transformed). |
|
270 |
2452
|
271 * New command-line argument --traditional sets the following |
|
272 preference variables for compatibility with Matlab: |
|
273 |
|
274 PS1 = ">> " |
|
275 PS2 = "" |
|
276 beep_on_error = 1 |
|
277 default_save_format = "mat-binary" |
|
278 define_all_return_values = 1 |
|
279 do_fortran_indexing = 1 |
|
280 empty_list_elements_ok = 1 |
|
281 implicit_str_to_num_ok = 1 |
|
282 ok_to_lose_imaginary_part = 1 |
|
283 page_screen_output = 0 |
|
284 prefer_column_vectors = 0 |
|
285 prefer_zero_one_indexing = 1 |
|
286 print_empty_dimensions = 0 |
|
287 treat_neg_dim_as_zero = 1 |
|
288 warn_function_name_clash = 0 |
|
289 whitespace_in_literal_matrix = "traditional" |
|
290 |
|
291 * New functions: |
|
292 |
|
293 readdir -- returns names of files in directory as array of strings |
|
294 mkdir -- create a directory |
|
295 rmdir -- remove a directory |
|
296 rename -- rename a file |
|
297 unlink -- delete a file |
|
298 umask -- set permission mask for file creation |
|
299 stat -- get information about a file |
|
300 lstat -- get information about a symbolic link |
2496
|
301 glob -- perform filename globbing |
|
302 fnmatch -- match strings with filename globbing patterns |
2452
|
303 more -- turn the pager on or off |
|
304 gammaln -- alias for lgamma |
|
305 |
|
306 * New audio functions from Andreas Weingessel |
|
307 <Andreas.Weingessel@ci.tuwien.ac.at>. |
|
308 |
2458
|
309 lin2mu -- linear to mu-law encoding |
|
310 loadaudio -- load an audio file to a vector |
|
311 mu2lin -- mu-law to linear encoding |
|
312 playaudio -- play an audio file |
|
313 record -- record sound and store in vector |
|
314 saveaudio -- save a vector as an audio file |
|
315 setaudio -- executes mixer shell command |
2452
|
316 |
|
317 * New plotting functions from Vinayak Dutt. Ones dealing with |
|
318 multiple plots on one page require features from gnuplot 3.6beta |
|
319 (or later). |
|
320 |
|
321 bottom_title -- put title at the bottom of the plot |
|
322 mplot -- multiplot version of plot |
|
323 multiplot -- switch multiple-plot mode on or off |
|
324 oneplot -- return to one plot per page |
|
325 plot_border -- put a border around plots |
|
326 subplot -- position multiple plots on a single page |
|
327 subwindow -- set subwindow position for next plot |
|
328 top_title -- put title at the top of the plot |
|
329 zlabel -- put a label on the z-axis |
|
330 |
|
331 * New string functions |
|
332 |
|
333 bin2dec -- convert a string of ones and zeros to an integer |
|
334 blanks -- create a string of blanks |
|
335 deblank -- delete trailing blanks |
|
336 dec2bin -- convert an integer to a string of ones and zeros |
|
337 dec2hex -- convert an integer to a hexadecimal string |
|
338 findstr -- locate occurrences of one string in another |
|
339 hex2dec -- convert a hexadecimal string to an integer |
|
340 index -- return position of first occurrence a string in another |
|
341 rindex -- return position of last occurrence a string in another |
|
342 split -- divide one string into pieces separated by another |
|
343 str2mat -- create a string matrix from a list of strings |
|
344 strrep -- replace substrings in a string |
|
345 substr -- extract a substring |
|
346 |
|
347 The following functions return a matrix of ones and zeros. |
|
348 Elements that are nonzero indicate that the condition was true for |
|
349 the corresponding character in the string array. |
|
350 |
|
351 isalnum -- letter or a digit |
|
352 isalpha -- letter |
|
353 isascii -- ascii |
|
354 iscntrl -- control character |
|
355 isdigit -- digit |
|
356 isgraph -- printable (but not space character) |
|
357 islower -- lower case |
|
358 isprint -- printable (including space character) |
|
359 ispunct -- punctuation |
|
360 isspace -- whitespace |
|
361 isupper -- upper case |
|
362 isxdigit -- hexadecimal digit |
|
363 |
|
364 These functions return new strings. |
|
365 |
2458
|
366 tolower -- convert to lower case |
|
367 toupper -- convert to upper case |
2452
|
368 |
|
369 * New function, fgetl. Both fgetl and fgets accept an optional |
|
370 second argument that specifies a maximum number of characters to |
|
371 read, and the function fgets is now compatible with Matlab. |
|
372 |
|
373 * Printing in hexadecimal format now works (format hex). It is also |
|
374 possible to print the internal bit representation of a value |
|
375 (format bit). Note that these formats are only implemented for |
|
376 numeric values. |
|
377 |
|
378 * Additional structure features: |
|
379 |
|
380 -- Name completion now works for structures. |
|
381 |
|
382 -- Values and names of structure elements are now printed by |
|
383 default. The new built-in variable `struct_levels_to_print' |
|
384 controls the depth of nested structures to print. The default |
|
385 value is 2. |
|
386 |
|
387 -- New functions: |
|
388 |
|
389 struct_contains (S, NAME) -- returns 1 if S is a structure with |
|
390 element NAME; otherwise returns 0. |
|
391 |
|
392 struct_elements (S) -- returns the names of all elements |
|
393 of structure S in an array of strings. |
|
394 |
|
395 * New io/subprocess functions: |
|
396 |
2458
|
397 fputs -- write a string to a file with no formatting |
|
398 popen2 -- start a subprocess with 2-way communication |
|
399 mkfifo -- create a FIFO special file |
|
400 popen -- open a pipe to a subprocess |
|
401 pclose -- close a pipe from a subprocess |
|
402 waitpid -- check the status of or wait for subprocesses |
2452
|
403 |
|
404 * New time functions: |
|
405 |
2458
|
406 asctime -- format time structure according to local format |
|
407 ctime -- equivalent to `asctime (localtime (TMSTRUCT))' |
|
408 gmtime -- return time structure corresponding to UTC |
|
409 localtime -- return time structure corresponding to local time zone |
|
410 strftime -- print given time structure using specified format |
|
411 time -- return current time |
2452
|
412 |
|
413 The `clock' and `date' functions are now implemented in M-files |
|
414 using these basic functions. |
|
415 |
|
416 * Access to additional Unix system calls: |
|
417 |
|
418 dup2 -- duplicate a file descriptor |
|
419 exec -- replace current process with a new process |
|
420 fcntl -- control open file descriptors |
|
421 fork -- create a copy of the current process |
|
422 getpgrp -- return the process group id of the current process |
|
423 getpid -- return the process id of the current process |
|
424 getppid -- return the process id of the parent process |
2475
|
425 getuid -- return the real user id of the current process |
|
426 getgid -- return the real group id of the current process |
|
427 geteuid -- return the effective user id of the current process |
|
428 getegid -- return the effective group id of the current process |
2452
|
429 pipe -- create an interprocess channel |
|
430 |
|
431 * Other new functions: |
|
432 |
2554
|
433 commutation_matrix -- compute special matrix form |
|
434 duplication_matrix -- compute special matrix form |
|
435 common_size.m -- bring arguments to a common size |
|
436 completion_matches -- perform command completion on string |
2458
|
437 tilde_expand -- perform tilde expansion on string |
2554
|
438 |
|
439 meshgrid -- compatible with Matlab's meshgrid function |
|
440 tmpnam -- replaces octave_tmp_file_name |
|
441 atexit -- register functions to be called when Octave exits |
|
442 putenv -- define an environment variable |
|
443 bincoeff -- compute binomial coefficients |
|
444 nextpow2 -- compute the next power of 2 greater than a number |
|
445 detrend -- remove a best fit polynomial from data |
|
446 erfinv -- inverse error function |
|
447 shift -- perform a circular shift on the elements of a matrix |
|
448 pow2 -- compute 2 .^ x |
|
449 log2 -- compute base 2 logarithms |
|
450 diff -- compute differences of matrix elements |
|
451 vech -- stack columns of a matrix below the diagonal |
|
452 vec -- stack columns of a matrix to form a vector |
|
453 xor -- compute exclusive or |
2452
|
454 |
2459
|
455 * Functions for getting info from the password database on Unix systems: |
|
456 |
|
457 getpwent -- read entry from password-file stream, opening if necessary |
|
458 getpwuid -- search for password entry with matching user ID |
|
459 getpwnam -- search for password entry with matching username |
|
460 setpwent -- rewind the password-file stream |
|
461 endpwent -- close the password-file stream |
|
462 |
2484
|
463 * Functions for getting info from the group database on Unix systems: |
|
464 |
|
465 getgrent -- read entry from group-file stream, opening if necessary |
|
466 getgrgid -- search for group entry with matching group ID |
|
467 getgrnam -- search for group entry with matching group name |
|
468 setgrent -- rewind the pgroup-file stream |
|
469 endgrent -- close the group-file stream |
|
470 |
2452
|
471 * The New function octave_config_info returns a structure containing |
|
472 information about how Octave was configured and compiled. |
|
473 |
|
474 * New function getrusage returns a structure containing system |
|
475 resource usage statistics. The `cputime' function is now defined |
|
476 in an M-file using getrusage. |
|
477 |
|
478 * The info reader is now a separate binary that runs as a |
|
479 subprocess. You still need the info reader distributed with |
|
480 Octave though, because there are some new command-line arguments |
|
481 that are not yet available in the public release of Info. |
|
482 |
|
483 * There is a new built-in variable, INFO_PROGRAM, which is used as |
|
484 the name of the info program to run. Its initial value is |
|
485 $OCTAVE_HOME/lib/octave/VERSION/exec/ARCH/info, but that value can |
|
486 be overridden by the environment variable OCTAVE_INFO_PROGRAM, or |
|
487 the command line argument --info-program NAME, or by setting the |
|
488 value of INFO_PROGRAM in a startup script. |
|
489 |
|
490 * There is a new built-in variable, EXEC_PATH, which is used as |
|
491 the list of directories to search when executing subprograms. Its |
|
492 initial value is taken from the environment variable |
|
493 OCTAVE_EXEC_PATH (if it exists) or PATH, but that value can be |
|
494 overridden by the the command line argument --exec-path PATH, or |
|
495 by setting the value of EXEC_PATH in a startup script. If the |
|
496 EXEC_PATH begins (ends) with a colon, the directories |
|
497 $OCTAVE_HOME/lib/octave/VERSION/exec/ARCH and $OCTAVE_HOME/bin are |
|
498 prepended (appended) to EXEC_PATH (if you don't specify a value |
|
499 for EXEC_PATH explicitly, these special directories are prepended |
|
500 to your PATH). |
|
501 |
|
502 * If it is present, Octave will now use an `ls-R' database file to |
|
503 speed up recursive path searching. Octave looks for a file called |
|
504 ls-R in the directory specified by the environment variable |
|
505 OCTAVE_DB_DIR. If that is not set but the environment variable |
|
506 OCTAVE_HOME is set, Octave looks in $OCTAVE_HOME/lib/octave. |
|
507 Otherwise, Octave looks in the directory $datadir/octave (normally |
|
508 /usr/local/lib/octave). |
|
509 |
|
510 * New examples directory. |
|
511 |
|
512 * There is a new script, mkoctfile, that can be used to create .oct |
|
513 files suitable for dynamic linking. |
|
514 |
|
515 * Many more bug fixes. |
|
516 |
|
517 * ChangeLogs are now kept in each subdirectory. |
|
518 |
|
519 See NEWS.1 for old news. |