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