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