1,847
edits
AndrewJanke (talk | contribs) m (fix typo) |
m (→How can I obtain Octave's source code?: https) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 50: | Line 50: | ||
Octave is free software and does not legally bind you to cite it. However, we have invested a lot of time and effort in creating GNU Octave, and we would appreciate if you would cite if you used. To cite GNU Octave in publications use: | Octave is free software and does not legally bind you to cite it. However, we have invested a lot of time and effort in creating GNU Octave, and we would appreciate if you would cite if you used. To cite GNU Octave in publications use: | ||
John W. Eaton, David Bateman, Søren Hauberg, Rik Wehbring ( | John W. Eaton, David Bateman, Søren Hauberg, Rik Wehbring ({{Release Year}}). | ||
GNU Octave version {{Release}} manual: a high-level interactive language for numerical computations. | GNU Octave version {{Release}} manual: a high-level interactive language for numerical computations. | ||
URL https://www.gnu.org/software/octave/doc/v{{Release}}/ | URL https://www.gnu.org/software/octave/doc/v{{Release}}/ | ||
Line 59: | Line 59: | ||
title = {{GNU Octave} version {{Release}} manual: a high-level interactive language for numerical computations}, | title = {{GNU Octave} version {{Release}} manual: a high-level interactive language for numerical computations}, | ||
author = {John W. Eaton and David Bateman and S{\o}ren Hauberg and Rik Wehbring}, | author = {John W. Eaton and David Bateman and S{\o}ren Hauberg and Rik Wehbring}, | ||
year = { | year = <span>{</span>{{Release Year}}}, | ||
url = {https://www.gnu.org/software/octave/doc/v{{Release}}/}, | url = {https://www.gnu.org/software/octave/doc/v{{Release}}/}, | ||
} | } | ||
Line 144: | Line 144: | ||
The latest version of the Octave source code (and older versions) is available from: | The latest version of the Octave source code (and older versions) is available from: | ||
* | * https://www.octave.org/download.html | ||
* https://ftp.gnu.org/gnu/octave/ | * https://ftp.gnu.org/gnu/octave/ | ||
Line 729: | Line 729: | ||
Octave has a lisp-like {{Codeline|unwind_protect}} block that allows blocks of code that terminate in an error to ensure that the variables that are touched are restored. You can do something similar with try/catch combined with {{Codeline|rethrow (lasterror ())}} in Matlab, however rethrow and lasterror are only available in Octave 2.9.10 and later. MATLAB 2008a also introduced {{Codeline|OnCleanUp}} that is similar to {{Codeline|unwind_protect}}, except that the object created by this function has to be explicitly cleared in order for the cleanup code to run. | Octave has a lisp-like {{Codeline|unwind_protect}} block that allows blocks of code that terminate in an error to ensure that the variables that are touched are restored. You can do something similar with try/catch combined with {{Codeline|rethrow (lasterror ())}} in Matlab, however rethrow and lasterror are only available in Octave 2.9.10 and later. MATLAB 2008a also introduced {{Codeline|OnCleanUp}} that is similar to {{Codeline|unwind_protect}}, except that the object created by this function has to be explicitly cleared in order for the cleanup code to run. | ||
Note that using try/catch combined with {{Codeline|rethrow (lasterror ())}} | Note that using try/catch combined with {{Codeline|rethrow (lasterror ())}} cannot guarantee that global variables will be correctly reset, as it won't catch user interrupts with Ctrl-C. For example | ||
<syntaxhighlight lang="Matlab"> | <syntaxhighlight lang="Matlab"> |