Jump to navigation Jump to search


1,004 bytes added, 06:27, 3 July 2017
Note: [ Automatic expansion of dimensions] was added to MATLAB R2016b.
===Documentation strings===
Octave allows extensive formatting of the help string of functions using Texinfo. The effect on the online documentation is relatively small, but makes the help string of functions conform to the help of Octave’s own functions. However, the effect on the appearance of printed or online documentation will be greatly improved.
===Test functions===
Octave allows to add self-tests to user defined functions. Tests are put after function definition in specially commented block.
function mult = a(val)
mult = val.*2;
%! assert (a(3), 6);
Such a function can be tested for valid outputs by following code:
octave:1> test a
PASSES 1 out of 1 test
===Demonstration Functions===
Example code block can be part of function file in a similar manner as test functions. For example to run demo for function multinom of package specfun, use:
demo multinom
===Powerfull assert===
Function assert have extended input possibilities.
==How does Octave solve linear systems?==


Navigation menu