2590
|
1 <!doctype html public "-//IETF//DTD HTML Strict//EN"> |
|
2 <html> |
|
3 <head> |
|
4 <title> Changes in Octave version 2 </title> |
|
5 </head> |
|
6 |
|
7 <body> |
|
8 <h1> News for Octave Version 2 </h1> |
|
9 <hr> |
|
10 |
3150
|
11 <h2>Summary of changes for version 2.0.10</h2> |
|
12 |
|
13 <ul> |
|
14 <li>The built-in variable `PWD' has been removed. If you need to get |
|
15 the value of the current working directory, use the pwd() function |
|
16 instead. |
|
17 </li> |
|
18 <p> |
|
19 <li>For compatibility with Matlab, Octave's lyap function now solves |
|
20 <pre> |
|
21 A*X + X*A' + C = 0 |
|
22 </pre> |
|
23 instead of |
|
24 <pre> |
|
25 A'*X + X*A + C = 0 |
|
26 </pre> |
|
27 To try to avoid confusion for people who are used to the way |
|
28 Octave behaved in previous versions, a warning is printed the |
|
29 first time lyap is called in a given session. To completely |
|
30 disable the warning, simply add |
|
31 <pre> |
|
32 global __disable_lyap_interface_change_warning__; |
|
33 </pre> |
|
34 to your ~/.octaverc file. The warning will eventually disappear |
|
35 for good in some future version of Octave. |
|
36 </li> |
|
37 <p> |
|
38 <li>New built-in functions for computing Bessel functions: |
|
39 besseli, besselj, besselk, and bessely. |
|
40 </li> |
|
41 <p> |
|
42 <li>The gammai and betai functions are now implemented as built-in |
|
43 functions rather than function files. |
|
44 </li> |
|
45 <p> |
|
46 <li>The new built-in variable `implicit_num_to_str_ok' controls |
|
47 whether Octave converts expressions like `[97, 98, 99, "123"]' to |
|
48 strings. The default value is 0 unless you use --traditional. |
|
49 </li> |
|
50 <p> |
|
51 <li>The new built-in variable `fixed_point_format' controls whether |
|
52 Octave uses a scaled fixed-point format for displaying matrices. |
|
53 The default value is 0 unless you use --traditional. |
|
54 </li> |
|
55 <p> |
|
56 <li>The function sumsq now computes sum (x .* conj (x)) for complex values. |
|
57 </li> |
|
58 <p> |
|
59 <li>Dynamically linked functions can be cleared. |
|
60 </li> |
|
61 <p> |
|
62 <li>If a .oct file has a time stamp more recent than the time that it |
|
63 was loaded, it is automatically reloaded. Reloading a .oct file |
|
64 may cause several functions to be cleared automatically. By |
|
65 default, a warning is printed that lists the names of the |
|
66 functions that will be cleared. You can suppress the message by |
|
67 setting the new built-in variable `warn_reload_forces_clear' to 0. |
|
68 </li> |
|
69 <p> |
|
70 <li>Global variables are now initialized to the empty matrix, for |
|
71 compatibility with Matlab. |
|
72 </li> |
|
73 <p> |
|
74 <li>Explicit initialization of global variables only happens once. |
|
75 For example, after the following statements are evaluated, g still |
|
76 has the value 1. |
|
77 <pre> |
|
78 global g = 1 |
|
79 global g = 2 |
|
80 </pre> |
|
81 This is useful for initializing global variables that are used to |
|
82 maintain state information that is shared among several functions. |
|
83 </li> |
|
84 <p> |
|
85 <li>The new built-in variable max_recursion_depth allows you to |
|
86 prevent Octave from attempting infinite recursion. The default |
|
87 value is 256. |
|
88 </li> |
|
89 <p> |
|
90 <li>Octave now uses readline version 2.1 and kpathsea 3.0. |
|
91 </li> |
|
92 <p> |
|
93 <li>The libreadline and libkpathsea libraries are no longer installed. |
|
94 </li> |
|
95 <p> |
|
96 <li>The libcruft, liboctave, and liboctinterp libraries are now |
|
97 installed in $libdir/octave instead of just $libdir. |
|
98 </li> |
|
99 <p> |
|
100 <li>It's no longer necessary to have libg++, but you do need to have |
|
101 the GNU implementation of libstdc++. If you are using gcc 2.7.2, |
|
102 libstdc++ is distributed as part of libg++ 2.7.2. For later |
|
103 versions, libstdc++ is distributed separately. For egcs, |
|
104 libstdc++ is included with the compiler distribution. |
|
105 </li> |
|
106 </ul> |
|
107 |
3079
|
108 <h2>Summary of changes for version 2.0.9</h2> |
|
109 |
|
110 This is a bug-fixing release, but there is one new user-visible |
|
111 feature: |
|
112 |
|
113 <ul> |
|
114 <li>It is now possible to specify a label for lines in the plot key |
|
115 when using the plot function. For example, |
|
116 <pre> |
|
117 plot (x, y, "-*;sin(x);") |
|
118 </pre> |
|
119 plots y vs. x using the linespoints style and sets the title of |
|
120 the line in the key to be `sin(x)' |
|
121 </li> |
|
122 </ul> |
|
123 |
|
124 <h2>Summary of changes for version 2.0.8</h2> |
|
125 |
|
126 This is a bug-fixing release. There are only a few new user-visible |
|
127 features. |
|
128 |
|
129 <ul> |
|
130 <li>If the argument to eig() is symmetric, Octave uses the specialized |
|
131 Lapack subroutine for symmetric matrices for a significant |
|
132 increase in performance. |
|
133 </li> |
3150
|
134 <p> |
3079
|
135 <li>It is now possible to use the mkoctfile script to create .oct |
|
136 files from multiple source and object files. |
|
137 </li> |
|
138 </ul> |
|
139 |
|
140 <h2>Summary of changes for version 2.0.7</h2> |
|
141 |
|
142 This is a bug-fixing release. There are no new user-visible features. |
|
143 |
|
144 <h2>Summary of changes for version 2.0.6</h2> |
|
145 |
|
146 This is primarily a bug-fixing release. There are only a few new |
|
147 user-visilbe features. |
|
148 |
|
149 <ul> |
|
150 <li>The new built-in variable default_eval_print_flag controls whether |
|
151 Octave prints the results of commands executed by eval() that do |
|
152 not end with semicolons. The default is 1. |
|
153 </li> |
3150
|
154 <p> |
3079
|
155 <li>The new built-in constant OCTAVE_HOME specifies the top-level |
|
156 directory where Octave is installed. |
|
157 </li> |
3150
|
158 <p> |
3079
|
159 <li>Octave no longer includes functions to work with NPSOL or QPSOL, |
|
160 because they are not free software. |
|
161 </li> |
|
162 </ul> |
|
163 |
2781
|
164 <h2>Summary of changes for version 2.0.5</h2> |
|
165 |
|
166 <ul> |
|
167 <li>A `switch' statement is now available. See the Statements chapter |
|
168 in the manual for details. |
|
169 </li> |
3150
|
170 <p> |
2781
|
171 <li>Commands like ls, save, and cd may now also be used as formal |
|
172 parameters for functions. |
3150
|
173 </li> |
|
174 <p> |
2781
|
175 <li>More tests. |
|
176 </li> |
|
177 </ul> |
|
178 |
2705
|
179 <h2>Summary of changes for version 2.0.4</h2> |
|
180 |
|
181 <ul> |
|
182 <li>It is now possible to use commands like ls, save, and cd as simple |
|
183 variable names. They still cannot be used as formal parameters |
|
184 for functions, or as the names of structure variables. Failed |
|
185 assignments leave them undefined (you can recover the orginal |
|
186 function definition using clear). |
3150
|
187 </li> |
2705
|
188 <p> |
|
189 <li>Is is now possible to invoke commands like ls, save, and cd as |
|
190 normal functions (for example, load ("foo", "x", "y", "z")). |
|
191 </li> |
|
192 </ul> |
|
193 |
2699
|
194 <h2>Summary of changes for version 2.0.3</h2> |
|
195 |
|
196 <ul> |
|
197 <li>The manual has been completely revised and now corresponds much |
|
198 more closely to the features of the current version. |
|
199 </li> |
|
200 <p> |
|
201 <li>The return value for assignment expressions is now the RHS since |
|
202 that is more consistent with the way other programming languages |
|
203 work. However, Octave still prints the entire LHS value so that |
|
204 <pre> |
|
205 x = zeros (1, 2); |
|
206 x(2) = 1 |
|
207 </pre> |
|
208 still prints |
|
209 <pre> |
|
210 x = |
|
211 |
|
212 0 1 |
|
213 |
|
214 </pre> |
|
215 but an assignment like |
|
216 <pre> |
|
217 z = x(2) = 1 |
|
218 </pre> |
|
219 sets z to 1 (not [ 0, 1 ] as in previous versions of Octave). |
|
220 </li> |
|
221 <p> |
|
222 <li>It is now much easier to make binary distributions. See the |
|
223 Binary Distributions section of the manual for more details. |
|
224 </li> |
|
225 </ul> |
|
226 |
|
227 <h2>Summary of changes for version 2.0.2</h2> |
|
228 |
|
229 <ul> |
|
230 </li> |
|
231 <li>Octave now stops executing commands from a script file if an error |
|
232 is encountered. |
3150
|
233 </li> |
2699
|
234 <p> |
|
235 <li>The return, and break commands now cause Octave to quit executing |
|
236 commands from script files. When used in invalid contexts, the |
|
237 break, continue, and return commands are now simply ignored |
|
238 instead of producing parse errors. |
3150
|
239 </li> |
2699
|
240 <p> |
|
241 <li>size ("") is now [0, 0]. |
3150
|
242 </li> |
2699
|
243 <p> |
|
244 <li>New functions: |
|
245 <dl> |
|
246 <dt><b>sleep</b></dt> |
|
247 <dd>pause execution for a specified number of seconds</dd> |
|
248 <dt><b>usleep</b></dt> |
|
249 <dd>pause execution for a specified number of microseconds</dd> |
|
250 </dl> |
|
251 </li> |
|
252 </ul> |
|
253 </pre> |
|
254 |
|
255 <h2>Summary of changes for version 2.0.1</h2> |
|
256 |
|
257 <p> |
|
258 Other than bug fixes, there were no user-visible changes in version |
|
259 2.0.1. |
|
260 |
2590
|
261 <h2>Summary of changes for version 2.0</h2> |
|
262 |
2699
|
263 <p> |
|
264 <ul> |
|
265 <li>The set and show commands for setting and displaying gnuplot |
2590
|
266 parameters have been replaced by gset and gshow. This change will |
|
267 probably break lots of things, but it is necessary to allow for |
|
268 compatibility with the Matlab graphics and GUI commands in a |
|
269 future version of Octave. (For now, the old set and show commands |
|
270 do work, but they print an annoying warning message to try to get |
|
271 people to switch to using gset.) |
2699
|
272 </li> |
|
273 <p> |
|
274 <li>Octave has been mostly ported to Windows NT and Windows 95 using |
2590
|
275 the beta 17 release of the Cygnus GNU-WIN32 tools. Not everything |
|
276 works, but it is usable. See the file README.WINDOWS for more |
|
277 information. |
2699
|
278 </li> |
|
279 <p> |
|
280 <li>Dynamic linking works on more systems using dlopen() and friends |
2590
|
281 (most modern Unix systems) or shl_load() and friends (HP/UX |
|
282 systems). A simple example is provided in examples/hello.cc. |
|
283 For this feature to work, you must configure Octave with |
|
284 --enable-shared. You may also need to have a shared-library |
|
285 version of libg++ and libstdc++. |
2699
|
286 </li> |
|
287 <p> |
|
288 <li>New data types can be added to Octave by writing a C++ class. On |
2590
|
289 systems that support dynamic linking, new data types can be added |
|
290 to an already running Octave binary. A simple example appears in |
|
291 the file examples/make_int.cc. Other examples are the standard |
|
292 Octave data types defined in the files src/ov*.{h,cc} and |
|
293 src/op-*.cc. |
2699
|
294 </li> |
|
295 <p> |
|
296 <li>The configure option --enable-bounds-check turns on bounds |
2590
|
297 checking on element references for Octave's internal array and |
|
298 matrix classes. It's enabled by default. To disable this |
|
299 feature, configure Octave with --disable-bounds-check. |
2699
|
300 </li> |
|
301 <p> |
|
302 <li>The C-style I/O functions (fopen, fprintf, etc.) have been |
2590
|
303 rewritten to be more compatible with Matlab. The fputs function |
|
304 has also been added. Usage of the *printf functions that was |
|
305 allowed in previous versions of Octave should still work. |
|
306 However, there is no way to make the new versions of the *scanf |
|
307 functions compatible with Matlab *and* previous versions of |
|
308 Octave. An optional argument to the *scanf functions is now |
|
309 available to make them behave in a way that is compatible with |
|
310 previous versions of Octave. |
2699
|
311 </li> |
|
312 <p> |
|
313 <li>Octave can now read files that contain columns of numbers only, |
2590
|
314 with no header information. The name of the loaded variable is |
|
315 constructed from the file name. Each line in the file must have |
|
316 the same number of elements. |
2699
|
317 </li> |
|
318 <p> |
|
319 <li>The interface to the pager has changed. The new built-in variable |
2590
|
320 `page_output_immediately' controls when Octave sends output to the |
|
321 pager. If it is nonzero, Octave sends output to the pager as soon |
|
322 as it is available. Otherwise, Octave buffers its output and |
|
323 waits until just before the prompt is printed to flush it to the |
|
324 pager. |
2699
|
325 </li> |
|
326 <p> |
|
327 <li>Expressions of the form |
|
328 <pre> |
2590
|
329 A(i,j) = x |
2699
|
330 </pre> |
2590
|
331 where X is a scalar and the indices i and j define a matrix of |
|
332 elements now work as you would expect rather than giving an error. |
|
333 I am told that this is how Matlab 5.0 will behave when it is |
|
334 released. |
2699
|
335 </li> |
|
336 <p> |
|
337 <li>Indexing of character strings now works. |
|
338 </li> |
|
339 <p> |
|
340 <li>The echo command has been implemented. |
|
341 </li> |
|
342 <p> |
|
343 <li>The document command is now a regular function. |
|
344 </li> |
|
345 <p> |
|
346 <li>New method for handling errors: |
|
347 <pre> |
2590
|
348 try |
|
349 BODY |
|
350 catch |
|
351 CLEANUP |
|
352 end_try_catch |
2699
|
353 </pre> |
2590
|
354 Where BODY and CLEANUP are both optional and may contain any |
|
355 Octave expressions or commands. The statements in CLEANUP are |
|
356 only executed if an error occurs in BODY. |
|
357 |
2699
|
358 <p> No warnings or error messages are printed while BODY is |
2590
|
359 executing. If an error does occur during the execution of BODY, |
|
360 CLEANUP can access the text of the message that would have been |
|
361 printed in the builtin constant __error_text__. This is the same |
|
362 as eval (TRY, CATCH) (which may now also use __error_text__) but |
|
363 it is more efficient since the commands do not need to be parsed |
|
364 each time the TRY and CATCH statements are evaluated. |
2699
|
365 </li> |
|
366 <p> |
|
367 <li>Octave no longer parses the help command by grabbing everything |
2590
|
368 after the keyword `help' until a newline character is read. To |
|
369 get help for `;' or `,', now, you need to use the command |
|
370 `help semicolon' or `help comma'. |
2699
|
371 </li> |
|
372 <p> |
|
373 <li>Octave's parser now does some simple constant folding. This means |
2590
|
374 that expressions like 3*i are now evaluated only once, when a |
|
375 function is compiled, and the right hand side of expressions like |
|
376 a = [1,2;3,4] are treated as true matrix constants rather than |
|
377 lists of elements which must be evaluated each time they are |
|
378 needed. |
2699
|
379 </li> |
|
380 <p> |
|
381 <li>Built-in variables that can take values of "true" and "false" can |
2590
|
382 now also be set to any nonzero scalar value to indicate "true", |
|
383 and 0 to indicate "false". |
2699
|
384 </li> |
|
385 <p> |
|
386 <li>New built-in variables `history_file', `history_size', and |
2590
|
387 `saving_history'. |
2699
|
388 </li> |
|
389 <p> |
|
390 <li>New built-in variable `string_fill_char' specifies the character |
2590
|
391 to fill with when creating arrays of strings. |
2699
|
392 </li> |
|
393 <p> |
|
394 <li>If the new built-in variable `gnuplot_has_frames' is nonzero, |
2590
|
395 Octave assumes that your copy of gnuplot includes support for |
|
396 multiple plot windows when using X11. |
|
397 |
|
398 If the new built-in variable `gnuplot_has_multiplot' is nonzero, |
|
399 Octave assumes that your copy of gnuplot has the multiplot support |
|
400 that is included in recent 3.6beta releases. |
|
401 |
|
402 The initial values of these variables are determined by configure, |
|
403 but can be changed in your startup script or at the command line |
|
404 in case configure got it wrong, or if you upgrade your gnuplot |
|
405 installation. |
2699
|
406 </li> |
|
407 <p> |
|
408 <li>The new plot function `figure' allows multiple plot windows when |
2590
|
409 using newer versions of gnuplot with X11. |
2699
|
410 </li> |
|
411 <p> |
|
412 <li>Octave now notices when the plotter has exited unexpectedly. |
|
413 </li> |
|
414 <p> |
|
415 <li>New built-in variable `warn_missing_semicolon'. If nonzero, Octave |
2590
|
416 will warn when statements in function definitions don't end in |
|
417 semicolons. The default value is 0. |
2699
|
418 </li> |
|
419 <p> |
|
420 <li>Octave now attempts to continue after floating point exceptions |
2590
|
421 or out-of-memory errors. |
2699
|
422 </li> |
|
423 <p> |
|
424 <li>If Octave crashes, it now attempts to save all user-defined |
2590
|
425 variables in a file named `octave-core' in the current directory |
|
426 before exiting. |
2699
|
427 </li> |
|
428 <p> |
|
429 <li>It is now possible to get the values of individual option settings |
2590
|
430 for the dassl, fsolve, lsode, npsol, qpsol, and quad functions |
|
431 using commands like |
2699
|
432 <pre> |
2590
|
433 dassl_reltol = dassl_options ("relative tolerance"); |
2699
|
434 </pre> |
|
435 </li> |
|
436 <p> |
|
437 <li>The svd() function no longer computes the left and right singular |
2590
|
438 matrices unnecessarily. This can significantly improve |
|
439 performance for large matrices if you are just looking for the |
|
440 singular values. |
2699
|
441 </li> |
|
442 <p> |
|
443 <li>The filter() function is now a built-in function. |
|
444 </li> |
|
445 <p> |
|
446 <li>New function randn() returns a pseudo-random number from a normal |
2590
|
447 distribution. The rand() and randn() functions have separate |
|
448 seeds and generators. |
2699
|
449 </li> |
|
450 <p> |
|
451 <li>Octave's command-line arguments are now available in the built-in |
2590
|
452 variable `argv'. The program name is also available in the |
|
453 variables `program_invocation_name' and `program_name'. If |
|
454 executing a script from the command line (e.g., octave foo.m) or |
|
455 using the `#! /bin/octave' hack, the program name is set to the |
|
456 name of the script. |
2699
|
457 </li> |
|
458 <p> |
|
459 <li>New built-in variable `completion_append_char' used as the |
2590
|
460 character to append to successful command-line completion |
|
461 attempts. The default is " " (a single space). |
2699
|
462 </li> |
|
463 <p> |
|
464 <li>Octave now uses a modified copy of the readline library from |
2590
|
465 version 1.14.5 of GNU bash. |
2699
|
466 </li> |
|
467 <p> |
|
468 <li>In prompt strings, `\H' expands to the whole host name. |
|
469 </li> |
|
470 <p> |
|
471 <li>New built-in variable `beep_on_error'. If nonzero, Octave will try |
2590
|
472 to ring your terminal's bell before printing an error message. |
|
473 The default value is 0. |
2699
|
474 </li> |
|
475 <p> |
|
476 <li>For functions defined from files, the type command now prints the |
2590
|
477 text of the file. You can still get the text reconstructed from |
|
478 the parse tree by using the new option -t (-transformed). |
2699
|
479 </li> |
|
480 <p> |
|
481 <li>New command-line argument --traditional sets the following |
2590
|
482 preference variables for compatibility with Matlab: |
2699
|
483 <pre> |
2590
|
484 PS1 = ">> " |
|
485 PS2 = "" |
|
486 beep_on_error = 1 |
|
487 default_save_format = "mat-binary" |
|
488 define_all_return_values = 1 |
|
489 do_fortran_indexing = 1 |
|
490 empty_list_elements_ok = 1 |
|
491 implicit_str_to_num_ok = 1 |
|
492 ok_to_lose_imaginary_part = 1 |
|
493 page_screen_output = 0 |
|
494 prefer_column_vectors = 0 |
|
495 prefer_zero_one_indexing = 1 |
|
496 print_empty_dimensions = 0 |
|
497 treat_neg_dim_as_zero = 1 |
|
498 warn_function_name_clash = 0 |
|
499 whitespace_in_literal_matrix = "traditional" |
2699
|
500 </pre> |
|
501 </li> |
|
502 <p> |
|
503 <li>New functions: |
|
504 <dl> |
|
505 <dt><b>readdir</b></dt> |
|
506 <dd>returns names of files in directory as array of strings |
|
507 </dd> |
|
508 <dt><b>mkdir</b></dt> |
|
509 <dd>create a directory |
|
510 </dd> |
|
511 <dt><b>rmdir</b></dt> |
|
512 <dd>remove a directory |
|
513 </dd> |
|
514 <dt><b>rename</b></dt> |
|
515 <dd>rename a file |
|
516 </dd> |
|
517 <dt><b>unlink</b></dt> |
|
518 <dd>delete a file |
|
519 </dd> |
|
520 <dt><b>umask</b></dt> |
|
521 <dd>set permission mask for file creation |
|
522 </dd> |
|
523 <dt><b>stat</b></dt> |
|
524 <dd>get information about a file |
|
525 </dd> |
|
526 <dt><b>lstat</b></dt> |
|
527 <dd>get information about a symbolic link |
|
528 </dd> |
|
529 <dt><b>glob</b></dt> |
|
530 <dd>perform filename globbing |
|
531 </dd> |
|
532 <dt><b>fnmatch</b></dt> |
|
533 <dd>match strings with filename globbing patterns |
|
534 </dd> |
|
535 <dt><b>more</b></dt> |
|
536 <dd>turn the pager on or off |
|
537 </dd> |
|
538 <dt><b>gammaln</b></dt> |
|
539 <dd>alias for lgamma |
|
540 </dd> |
|
541 </dl> |
|
542 </li> |
|
543 <p> |
|
544 <li>New audio functions from Andreas Weingessel: |
|
545 <dl> |
|
546 <dt><b>lin2mu</b></dt> |
|
547 <dd>linear to mu-law encoding |
|
548 </dd> |
|
549 <dt><b>loadaudio</b></dt> |
|
550 <dd>load an audio file to a vector |
|
551 </dd> |
|
552 <dt><b>mu2lin</b></dt> |
|
553 <dd>mu-law to linear encoding |
|
554 </dd> |
|
555 <dt><b>playaudio</b></dt> |
|
556 <dd>play an audio file |
|
557 </dd> |
|
558 <dt><b>record</b></dt> |
|
559 <dd>record sound and store in vector |
|
560 </dd> |
|
561 <dt><b>saveaudio</b></dt> |
|
562 <dd>save a vector as an audio file |
|
563 </dd> |
|
564 <dt><b>setaudio</b></dt> |
|
565 <dd>executes mixer shell command |
|
566 </dd> |
|
567 </dl> |
|
568 </li> |
|
569 <p> |
|
570 <li>New plotting functions from Vinayak Dutt. Ones dealing with |
2590
|
571 multiple plots on one page require features from gnuplot 3.6beta |
|
572 (or later). |
2699
|
573 <dl> |
|
574 <dt><b>bottom_title</b></dt> |
|
575 <dd>put title at the bottom of the plot |
|
576 </dd> |
|
577 <dt><b>mplot</b></dt> |
|
578 <dd>multiplot version of plot |
|
579 </dd> |
|
580 <dt><b>multiplot</b></dt> |
|
581 <dd>switch multiple-plot mode on or off |
|
582 </dd> |
|
583 <dt><b>oneplot</b></dt> |
|
584 <dd>return to one plot per page |
|
585 </dd> |
|
586 <dt><b>plot_border</b></dt> |
|
587 <dd>put a border around plots |
|
588 </dd> |
|
589 <dt><b>subplot</b></dt> |
|
590 <dd>position multiple plots on a single page |
|
591 </dd> |
|
592 <dt><b>subwindow</b></dt> |
|
593 <dd>set subwindow position for next plot |
|
594 </dd> |
|
595 <dt><b>top_title</b></dt> |
|
596 <dd>put title at the top of the plot |
|
597 </dd> |
|
598 <dt><b>zlabel</b></dt> |
|
599 <dd>put a label on the z-axis |
|
600 </dd> |
|
601 </dl> |
|
602 </li> |
|
603 <p> |
|
604 <li>New string functions |
|
605 <dl> |
|
606 <dt><b>bin2dec</b></dt> |
|
607 <dd>convert a string of ones and zeros to an integer |
|
608 </dd> |
|
609 <dt><b>blanks</b></dt> |
|
610 <dd>create a string of blanks |
|
611 </dd> |
|
612 <dt><b>deblank</b></dt> |
|
613 <dd>delete trailing blanks |
|
614 </dd> |
|
615 <dt><b>dec2bin</b></dt> |
|
616 <dd>convert an integer to a string of ones and zeros |
|
617 </dd> |
|
618 <dt><b>dec2hex</b></dt> |
|
619 <dd>convert an integer to a hexadecimal string |
|
620 </dd> |
|
621 <dt><b>findstr</b></dt> |
|
622 <dd>locate occurrences of one string in another |
|
623 </dd> |
|
624 <dt><b>hex2dec</b></dt> |
|
625 <dd>convert a hexadecimal string to an integer |
|
626 </dd> |
|
627 <dt><b>index</b></dt> |
|
628 <dd>return position of first occurrence a string in another |
|
629 </dd> |
|
630 <dt><b>rindex</b></dt> |
|
631 <dd>return position of last occurrence a string in another |
|
632 </dd> |
|
633 <dt><b>split</b></dt> |
|
634 <dd>divide one string into pieces separated by another |
|
635 </dd> |
|
636 <dt><b>str2mat</b></dt> |
|
637 <dd>create a string matrix from a list of strings |
|
638 </dd> |
|
639 <dt><b>strrep</b></dt> |
|
640 <dd>replace substrings in a string |
|
641 </dd> |
|
642 <dt><b>substr</b></dt> |
|
643 <dd>extract a substring |
|
644 </dd> |
|
645 </dl> |
|
646 <p> |
2590
|
647 The following functions return a matrix of ones and zeros. |
|
648 Elements that are nonzero indicate that the condition was true for |
|
649 the corresponding character in the string array. |
2699
|
650 <dl> |
|
651 <dt><b>isalnum</b></dt> |
|
652 <dd>letter or a digit |
|
653 </dd> |
|
654 <dt><b>isalpha</b></dt> |
|
655 <dd>letter |
|
656 </dd> |
|
657 <dt><b>isascii</b></dt> |
|
658 <dd>ascii |
|
659 </dd> |
|
660 <dt><b>iscntrl</b></dt> |
|
661 <dd>control character |
|
662 </dd> |
|
663 <dt><b>isdigit</b></dt> |
|
664 <dd>digit |
|
665 </dd> |
|
666 <dt><b>isgraph</b></dt> |
|
667 <dd>printable (but not space character) |
|
668 </dd> |
|
669 <dt><b>islower</b></dt> |
|
670 <dd>lower case |
|
671 </dd> |
|
672 <dt><b>isprint</b></dt> |
|
673 <dd>printable (including space character) |
|
674 </dd> |
|
675 <dt><b>ispunct</b></dt> |
|
676 <dd>punctuation |
|
677 </dd> |
|
678 <dt><b>isspace</b></dt> |
|
679 <dd>whitespace |
|
680 </dd> |
|
681 <dt><b>isupper</b></dt> |
|
682 <dd>upper case |
|
683 </dd> |
|
684 <dt><b>isxdigit</b></dt> |
|
685 <dd>hexadecimal digit |
|
686 </dd> |
|
687 </dl> |
|
688 <p> |
2590
|
689 These functions return new strings. |
2699
|
690 <dl> |
|
691 <dt><b>tolower</b></dt> |
|
692 <dd>convert to lower case |
|
693 </dd> |
|
694 <dt><b>toupper</b></dt> |
|
695 <dd>convert to upper case |
|
696 </dd> |
|
697 </dl> |
|
698 </li> |
|
699 <p> |
|
700 <li>New function, fgetl. Both fgetl and fgets accept an optional |
2590
|
701 second argument that specifies a maximum number of characters to |
|
702 read, and the function fgets is now compatible with Matlab. |
2699
|
703 </li> |
|
704 <p> |
|
705 <li>Printing in hexadecimal format now works (format hex). It is also |
2590
|
706 possible to print the internal bit representation of a value |
|
707 (format bit). Note that these formats are only implemented for |
|
708 numeric values. |
2699
|
709 </li> |
|
710 <p> |
|
711 <li>Additional structure features: |
|
712 <ul> |
|
713 <li>Name completion now works for structures. |
|
714 </li> |
|
715 <li>Values and names of structure elements are now printed by |
|
716 default. The new built-in variable `struct_levels_to_print' |
|
717 controls the depth of nested structures to print. The default |
|
718 value is 2. |
|
719 </li> |
|
720 <li>New functions: |
|
721 <dl> |
|
722 <dt><b>struct_contains (S, NAME)</b></dt> |
|
723 <dd>returns 1 if S is a structure with element NAME; otherwise returns 0. |
|
724 </dd> |
|
725 <dt><b>struct_elements (S)</b></dt> |
|
726 <dd>returns the names of all elements of structure S in an array of |
|
727 strings. |
|
728 </dd> |
|
729 </dl> |
|
730 </li> |
|
731 </ul> |
|
732 </li> |
|
733 <p> |
|
734 <li>New io/subprocess functions: |
|
735 <dl> |
|
736 <dt><b>fputs</b></dt> |
|
737 <dd>write a string to a file with no formatting |
|
738 </dd> |
|
739 <dt><b>popen2</b></dt> |
|
740 <dd>start a subprocess with 2-way communication |
|
741 </dd> |
|
742 <dt><b>mkfifo</b></dt> |
|
743 <dd>create a FIFO special file |
|
744 </dd> |
|
745 <dt><b>popen</b></dt> |
|
746 <dd>open a pipe to a subprocess |
|
747 </dd> |
|
748 <dt><b>pclose</b></dt> |
|
749 <dd>close a pipe from a subprocess |
|
750 </dd> |
|
751 <dt><b>waitpid</b></dt> |
|
752 <dd>check the status of or wait for subprocesses |
|
753 </dd> |
|
754 </dl> |
|
755 </li> |
|
756 <p> |
|
757 <li>New time functions: |
|
758 <dl> |
|
759 <dt><b>asctime</b></dt> |
|
760 <dd>format time structure according to local format |
|
761 </dd> |
|
762 <dt><b>ctime</b></dt> |
|
763 <dd>equivalent to `asctime (localtime (TMSTRUCT))' |
|
764 </dd> |
|
765 <dt><b>gmtime</b></dt> |
|
766 <dd>return time structure corresponding to UTC |
|
767 </dd> |
|
768 <dt><b>localtime</b></dt> |
|
769 <dd>return time structure corresponding to local time zone |
|
770 </dd> |
|
771 <dt><b>strftime</b></dt> |
|
772 <dd>print given time structure using specified format |
|
773 </dd> |
|
774 <dt><b>time</b></dt> |
|
775 <dd>return current time |
|
776 </dd> |
|
777 </dl> |
|
778 <p> |
2590
|
779 The `clock' and `date' functions are now implemented in M-files |
|
780 using these basic functions. |
2699
|
781 </li> |
|
782 <p> |
|
783 <li>Access to additional Unix system calls: |
|
784 <dl> |
|
785 <dt><b>dup2</b></dt> |
|
786 <dd>duplicate a file descriptor |
|
787 </dd> |
|
788 <dt><b>exec</b></dt> |
|
789 <dd>replace current process with a new process |
|
790 </dd> |
|
791 <dt><b>fcntl</b></dt> |
|
792 <dd>control open file descriptors |
|
793 </dd> |
|
794 <dt><b>fork</b></dt> |
|
795 <dd>create a copy of the current process |
|
796 </dd> |
|
797 <dt><b>getpgrp</b></dt> |
|
798 <dd>return the process group id of the current process |
|
799 </dd> |
|
800 <dt><b>getpid</b></dt> |
|
801 <dd>return the process id of the current process |
|
802 </dd> |
|
803 <dt><b>getppid</b></dt> |
|
804 <dd>return the process id of the parent process |
|
805 </dd> |
|
806 <dt><b>getuid</b></dt> |
|
807 <dd>return the real user id of the current process |
|
808 </dd> |
|
809 <dt><b>getgid</b></dt> |
|
810 <dd>return the real group id of the current process |
|
811 </dd> |
|
812 <dt><b>geteuid</b></dt> |
|
813 <dd>return the effective user id of the current process |
|
814 </dd> |
|
815 <dt><b>getegid</b></dt> |
|
816 <dd>return the effective group id of the current process |
|
817 </dd> |
|
818 <dt><b>pipe</b></dt> |
|
819 <dd>create an interprocess channel |
|
820 </dd> |
|
821 </dl> |
|
822 </li> |
|
823 <p> |
|
824 <li>Other new functions: |
|
825 <dl> |
|
826 <dt><b>commutation_matrix</b></dt> |
|
827 <dd>compute special matrix form |
|
828 </dd> |
|
829 <dt><b>duplication_matrix</b></dt> |
|
830 <dd>compute special matrix form |
|
831 </dd> |
|
832 <dt><b>common_size.m</b></dt> |
|
833 <dd>bring arguments to a common size |
|
834 </dd> |
|
835 <dt><b>completion_matches</b></dt> |
|
836 <dd>perform command completion on string |
|
837 </dd> |
|
838 <dt><b>tilde_expand</b></dt> |
|
839 <dd>perform tilde expansion on string |
|
840 </dd> |
|
841 <dt><b>meshgrid</b></dt> |
|
842 <dd>compatible with Matlab's meshgrid function |
|
843 </dd> |
|
844 <dt><b>tmpnam</b></dt> |
|
845 <dd>replaces octave_tmp_file_name |
|
846 </dd> |
|
847 <dt><b>atexit</b></dt> |
|
848 <dd>register functions to be called when Octave exits |
|
849 </dd> |
|
850 <dt><b>putenv</b></dt> |
|
851 <dd>define an environment variable |
|
852 </dd> |
|
853 <dt><b>bincoeff</b></dt> |
|
854 <dd>compute binomial coefficients |
|
855 </dd> |
|
856 <dt><b>nextpow2</b></dt> |
|
857 <dd>compute the next power of 2 greater than a number |
|
858 </dd> |
|
859 <dt><b>detrend</b></dt> |
|
860 <dd>remove a best fit polynomial from data |
|
861 </dd> |
|
862 <dt><b>erfinv</b></dt> |
|
863 <dd>inverse error function |
|
864 </dd> |
|
865 <dt><b>shift</b></dt> |
|
866 <dd>perform a circular shift on the elements of a matrix |
|
867 </dd> |
|
868 <dt><b>pow2</b></dt> |
|
869 <dd>compute 2 .^ x |
|
870 </dd> |
|
871 <dt><b>log2</b></dt> |
|
872 <dd>compute base 2 logarithms |
|
873 </dd> |
|
874 <dt><b>diff</b></dt> |
|
875 <dd>compute differences of matrix elements |
|
876 </dd> |
|
877 <dt><b>vech</b></dt> |
|
878 <dd>stack columns of a matrix below the diagonal |
|
879 </dd> |
|
880 <dt><b>vec</b></dt> |
|
881 <dd>stack columns of a matrix to form a vector |
|
882 </dd> |
|
883 <dt><b>xor</b></dt> |
|
884 <dd>compute exclusive or |
|
885 </dd> |
|
886 </dl> |
|
887 </li> |
|
888 <p> |
|
889 <li>Functions for getting info from the password database on Unix systems: |
|
890 <dl> |
|
891 <dt><b>getpwent</b></dt> |
|
892 <dd>read entry from password-file stream, opening if necessary |
|
893 </dd> |
|
894 <dt><b>getpwuid</b></dt> |
|
895 <dd>search for password entry with matching user ID |
|
896 </dd> |
|
897 <dt><b>getpwnam</b></dt> |
|
898 <dd>search for password entry with matching username |
|
899 </dd> |
|
900 <dt><b>setpwent</b></dt> |
|
901 <dd>rewind the password-file stream |
|
902 </dd> |
|
903 <dt><b>endpwent</b></dt> |
|
904 <dd>close the password-file stream |
|
905 </dd> |
|
906 </dl> |
|
907 </li> |
|
908 <p> |
|
909 <li>Functions for getting info from the group database on Unix systems: |
|
910 <dl> |
|
911 <dt><b>getgrent</b></dt> |
|
912 <dd>read entry from group-file stream, opening if necessary |
|
913 </dd> |
|
914 <dt><b>getgrgid</b></dt> |
|
915 <dd>search for group entry with matching group ID |
|
916 </dd> |
|
917 <dt><b>getgrnam</b></dt> |
|
918 <dd>search for group entry with matching group name |
|
919 </dd> |
|
920 <dt><b>setgrent</b></dt> |
|
921 <dd>rewind the pgroup-file stream |
|
922 </dd> |
|
923 <dt><b>endgrent</b></dt> |
|
924 <dd>close the group-file stream |
|
925 </dd> |
|
926 </dl> |
|
927 </li> |
|
928 <p> |
|
929 <li>The New function octave_config_info returns a structure containing |
2590
|
930 information about how Octave was configured and compiled. |
2699
|
931 </li> |
|
932 <p> |
|
933 <li>New function getrusage returns a structure containing system |
2590
|
934 resource usage statistics. The `cputime' function is now defined |
|
935 in an M-file using getrusage. |
2699
|
936 </li> |
|
937 <p> |
|
938 <li>The info reader is now a separate binary that runs as a |
2590
|
939 subprocess. You still need the info reader distributed with |
|
940 Octave though, because there are some new command-line arguments |
|
941 that are not yet available in the public release of Info. |
2699
|
942 </li> |
|
943 <p> |
|
944 <li>There is a new built-in variable, INFO_PROGRAM, which is used as |
2590
|
945 the name of the info program to run. Its initial value is |
|
946 $OCTAVE_HOME/lib/octave/VERSION/exec/ARCH/info, but that value can |
|
947 be overridden by the environment variable OCTAVE_INFO_PROGRAM, or |
|
948 the command line argument --info-program NAME, or by setting the |
|
949 value of INFO_PROGRAM in a startup script. |
2699
|
950 </li> |
|
951 <p> |
|
952 <li>There is a new built-in variable, EXEC_PATH, which is used as |
2590
|
953 the list of directories to search when executing subprograms. Its |
|
954 initial value is taken from the environment variable |
|
955 OCTAVE_EXEC_PATH (if it exists) or PATH, but that value can be |
|
956 overridden by the the command line argument --exec-path PATH, or |
|
957 by setting the value of EXEC_PATH in a startup script. If the |
|
958 EXEC_PATH begins (ends) with a colon, the directories |
|
959 $OCTAVE_HOME/lib/octave/VERSION/exec/ARCH and $OCTAVE_HOME/bin are |
|
960 prepended (appended) to EXEC_PATH (if you don't specify a value |
|
961 for EXEC_PATH explicitly, these special directories are prepended |
|
962 to your PATH). |
2699
|
963 </li> |
|
964 <p> |
|
965 <li>If it is present, Octave will now use an `ls-R' database file to |
2590
|
966 speed up recursive path searching. Octave looks for a file called |
|
967 ls-R in the directory specified by the environment variable |
|
968 OCTAVE_DB_DIR. If that is not set but the environment variable |
|
969 OCTAVE_HOME is set, Octave looks in $OCTAVE_HOME/lib/octave. |
|
970 Otherwise, Octave looks in the directory $datadir/octave (normally |
|
971 /usr/local/lib/octave). |
2699
|
972 </li> |
|
973 <p> |
|
974 <li>New examples directory. |
|
975 </li> |
|
976 <p> |
|
977 <li>There is a new script, mkoctfile, that can be used to create .oct |
2590
|
978 files suitable for dynamic linking. |
2699
|
979 </li> |
|
980 <p> |
|
981 <li>Many more bug fixes. |
|
982 </li> |
|
983 <p> |
|
984 <li>ChangeLogs are now kept in each subdirectory.</li> |
|
985 </li> |
|
986 </ul> |
2590
|
987 |
|
988 </body> |
|
989 </html> |