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