Mercurial > hg > octave-lojdl
changeset 9309:fb8b8589dd46
Expand documentation for 'complex' function
author | Rik <rdrider0-list@yahoo.com> |
---|---|
date | Sat, 06 Jun 2009 22:01:10 -0700 |
parents | f2bf62f62286 |
children | 256c0db275b6 |
files | src/ChangeLog src/data.cc src/ov-flt-re-mat.cc src/ov-re-mat.cc |
diffstat | 4 files changed, 19 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2009-06-06 Rik <rdrider0-list@yahoo.com> + + * data.cc: Update documentation for 'complex' function + 2009-06-06 Rik <rdrider0-list@yahoo.com> * load-save.cc: Update documentation for NA and isna functions
--- a/src/data.cc +++ b/src/data.cc @@ -2783,9 +2783,20 @@ DEFUN (complex, args, , "-*- texinfo -*-\n\ -@deftypefn {Built-in Function} {} complex (@var{val})\n\ +@deftypefn {Built-in Function} {} complex (@var{x})\n\ @deftypefnx {Built-in Function} {} complex (@var{re}, @var{im})\n\ -Convert @var{x} to a complex value.\n\ +Return a complex result from real arguments. With 1 real argument @var{x},\n\ +return the complex result @code{@var{x} + 0i}. With 2 real arguments,\n\ +return the complex result @code{@var{re} + @var{im}}. @code{complex} can\n\ +often be more convenient than expressions such as @code{a + i*b}.\n\ +For example:\n\ +\n\ +@example\n\ +complex ([1, 2], [3, 4])\n\ +@result{}\n\ + 1 + 3i 2 + 4i\n\ +@end example\n\ +@seealso{real, imag, iscomplex}\n\ @end deftypefn") { octave_value retval;