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