GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
ov-fcn-inline.cc File Reference
#include <istream>
#include <iostream>
#include <sstream>
#include <vector>
#include "oct-locbuf.h"
#include "defun.h"
#include "error.h"
#include "gripes.h"
#include "oct-map.h"
#include "ov-base.h"
#include "ov-fcn-inline.h"
#include "ov-usr-fcn.h"
#include "pr-output.h"
#include "variables.h"
#include "parse.h"
#include "toplev.h"
#include "byte-swap.h"
#include "ls-ascii-helper.h"
#include "ls-oct-ascii.h"
#include "ls-hdf5.h"
#include "ls-utils.h"
Include dependency graph for ov-fcn-inline.cc:

Go to the source code of this file.

Functions

 DEFINE_OCTAVE_ALLOCATOR (octave_fcn_inline)
 DEFUN (formula, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} formula (@var{fun})\n\ Return a character string representing the inline function @var{fun}.\n\ Note that @code{char (@var{fun})} is equivalent to\n\ @code{formula (@var{fun})}.\n\ @seealso{argnames, inline, vectorize}\n\ @end deftypefn")
 DEFUN (argnames, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} argnames (@var{fun})\n\ Return a cell array of character strings containing the names of\n\ the arguments of the inline function @var{fun}.\n\ @seealso{inline, formula, vectorize}\n\ @end deftypefn")
 DEFUN (vectorize, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} vectorize (@var{fun})\n\ Create a vectorized version of the inline function @var{fun}\n\ by replacing all occurrences of @code{*}, @code{/}, etc., with\n\ @code{.*}, @code{./}, etc.\n\ \n\ This may be useful, for example, when using inline functions with\n\ numerical integration or optimization where a vector-valued function\n\ is expected.\n\ \n\ @example\n\ @group\n\ fcn = vectorize (inline (\"x^2 - 1\"))\n\ @result{} fcn = f(x) = x.^2 - 1\n\ quadv (fcn, 0, 3)\n\ @result{} 6\n\ @end group\n\ @end example\n\ @seealso{inline, formula, argnames}\n\ @end deftypefn")
 DEFUNX ("inline", Finline, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} inline (@var{str})\n\ @deftypefnx {Built-in Function} {} inline (@var{str}, @var{arg1}, @dots{})\n\ @deftypefnx {Built-in Function} {} inline (@var{str}, @var{n})\n\ Create an inline function from the character string @var{str}.\n\ If called with a single argument, the arguments of the generated\n\ function are extracted from the function itself. The generated\n\ function arguments will then be in alphabetical order. It should\n\ be noted that i, and j are ignored as arguments due to the\n\ ambiguity between their use as a variable or their use as an inbuilt\n\ constant. All arguments followed by a parenthesis are considered\n\ to be functions. If no arguments are found, a function taking a single\n\ argument named @code{x} will be created.\n\ \n\ If the second and subsequent arguments are character strings,\n\ they are the names of the arguments of the function.\n\ \n\ If the second argument is an integer @var{n}, the arguments are\n\ @qcode{\"x\"}, @qcode{\"P1\"}, @dots{}, @qcode{\"P@var{N}\"}.\n\ @seealso{argnames, formula, vectorize}\n\ @end deftypefn")

Function Documentation

DEFINE_OCTAVE_ALLOCATOR ( octave_fcn_inline  )
DEFUN ( formula  ,
args   
)
DEFUN ( argnames  ,
args   
)
DEFUN ( vectorize  ,
args   
)
DEFUNX ( "inline"  ,
Finline  ,
args   
)