annotate src/builtins.cc @ 1245:85d1899047e1

[project @ 1995-04-11 00:45:35 by jwe]
author jwe
date Tue, 11 Apr 1995 00:45:35 +0000
parents 4f65175911a6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
605
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
1 // DO NOT EDIT! Generated automatically by mkbuiltins.
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
2
240
a99f28f5e351 [project @ 1993-11-30 20:24:36 by jwe]
jwe
parents: 210
diff changeset
3 #ifdef HAVE_CONFIG_H
a99f28f5e351 [project @ 1993-11-30 20:24:36 by jwe]
jwe
parents: 210
diff changeset
4 #include "config.h"
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
5 #endif
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
6
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
7 #include "mappers.h"
290
5325afdb0ef5 [project @ 1994-01-13 19:21:40 by jwe]
jwe
parents: 287
diff changeset
8 #include "variables.h"
605
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
9 #include "builtins.h"
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
10 #include "oct-obj.h"
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
11
605
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
12 static void
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
13 install_builtin_functions (void)
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
14 {
605
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
15 extern Octave_object Fall (const Octave_object& args, int nargout) ; static builtin_function Sall = { "all" , 2 , 1 , 0 , Fall ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
16 "all (X): are all elements of X nonzero?" }; install_builtin_function (& Sall );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
17 extern Octave_object Fany (const Octave_object& args, int nargout) ; static builtin_function Sany = { "any" , 2 , 1 , 0 , Fany ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
18 "any (X): are any elements of X nonzero?" }; install_builtin_function (& Sany );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
19 extern Octave_object Fcumprod (const Octave_object& args, int nargout) ; static builtin_function Scumprod = { "cumprod" , 2 , 1 , 0 , Fcumprod ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
20 "cumprod (X): cumulative products" }; install_builtin_function (& Scumprod );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
21 extern Octave_object Fcumsum (const Octave_object& args, int nargout) ; static builtin_function Scumsum = { "cumsum" , 2 , 1 , 0 , Fcumsum ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
22 "cumsum (X): cumulative sums" }; install_builtin_function (& Scumsum );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
23 extern Octave_object Fdiag (const Octave_object& args, int nargout) ; static builtin_function Sdiag = { "diag" , 3 , 1 , 0 , Fdiag ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
24 "diag (X [,k]): form/extract diagonals" }; install_builtin_function (& Sdiag );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
25 extern Octave_object Fisstr (const Octave_object& args, int nargout) ; static builtin_function Sisstr = { "isstr" , 2 , 1 , 0 , Fisstr ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
26 "isstr (X): return 1 if X is a string, 0 otherwise" }; install_builtin_function (& Sisstr );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
27 extern Octave_object Fprod (const Octave_object& args, int nargout) ; static builtin_function Sprod = { "prod" , 2 , 1 , 0 , Fprod ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
28 "prod (X): products" }; install_builtin_function (& Sprod );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
29 extern Octave_object Fsetstr (const Octave_object& args, int nargout) ; static builtin_function Ssetstr = { "setstr" , 2 , 1 , 0 , Fsetstr ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
30 "setstr (V): convert a vector to a string" }; install_builtin_function (& Ssetstr );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
31 extern Octave_object Fsize (const Octave_object& args, int nargout) ; static builtin_function Ssize = { "size" , 2 , 1 , 0 , Fsize ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
32 "[m, n] = size (x): return rows and columns of X" }; install_builtin_function (& Ssize );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
33 extern Octave_object Fsum (const Octave_object& args, int nargout) ; static builtin_function Ssum = { "sum" , 2 , 1 , 0 , Fsum ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
34 "sum (X): sum of elements" }; install_builtin_function (& Ssum );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
35 extern Octave_object Fsumsq (const Octave_object& args, int nargout) ; static builtin_function Ssumsq = { "sumsq" , 2 , 1 , 0 , Fsumsq ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
36 "sumsq (X): sum of squares of elements" }; install_builtin_function (& Ssumsq );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
37 extern Octave_object Fones (const Octave_object& args, int nargout) ; static builtin_function Sones = { "ones" , 3 , 1 , 0 , Fones ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
38 "ones (N), ones (N, M), ones (X): create a matrix of all ones" }; install_builtin_function (& Sones );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
39 extern Octave_object Fzeros (const Octave_object& args, int nargout) ; static builtin_function Szeros = { "zeros" , 3 , 1 , 0 , Fzeros ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
40 "zeros (N), zeros (N, M), zeros (X): create a matrix of all zeros" }; install_builtin_function (& Szeros );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
41 extern Octave_object Feye (const Octave_object& args, int nargout) ; static builtin_function Seye = { "eye" , 3 , 1 , 0 , Feye ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
42 "eye (N), eye (N, M), eye (X): create an identity matrix" }; install_builtin_function (& Seye );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
43 extern Octave_object Fcd (const Octave_object& args, int nargout) ; static builtin_function Scd = { "cd" , 2 , 1 , 1 , Fcd ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
44 "cd [dir]\n\nchange current working directory\nif no arguments are given, the current directory is changed to the\nusers home directory" }; install_builtin_function (& Scd );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
45 extern Octave_object Fls (const Octave_object& args, int nargout) ; static builtin_function Sls = { "ls" , -1 , 1 , 1 , Fls ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
46 "ls [options]\n\nprint a directory listing" }; install_builtin_function (& Sls );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
47 alias_builtin ("dir", "ls"); ;
181
91ec95436dca [project @ 1993-10-23 22:45:17 by jwe]
jwe
parents: 169
diff changeset
48
605
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
49 extern Octave_object Fpwd (const Octave_object& args, int nargout) ; static builtin_function Spwd = { "pwd" , 1 , 0 , 0 , Fpwd ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
50 "pwd (): print current working directory" }; install_builtin_function (& Spwd );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
51 extern Octave_object Ferror (const Octave_object& args, int nargout) ; static builtin_function Serror = { "error" , 2 , 1 , 0 , Ferror ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
52 "error (MESSAGE): print MESSAGE and set the error state.\nThis should eventually take us up to the top level, possibly\nprinting traceback messages as we go.\n\nIf MESSAGE ends in a newline character, traceback messages are not\nprinted." }; install_builtin_function (& Serror );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
53 extern Octave_object Ffclose (const Octave_object& args, int nargout) ; static builtin_function Sfclose = { "fclose" , 2 , 1 , 0 , Ffclose ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
54 "fclose (FILENAME or FILENUM): close a file" }; install_builtin_function (& Sfclose );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
55 extern Octave_object Ffflush (const Octave_object& args, int nargout) ; static builtin_function Sfflush = { "fflush" , 2 , 1 , 0 , Ffflush ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
56 "fflush (FILENAME or FILENUM): flush buffered data to output file" }; install_builtin_function (& Sfflush );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
57 extern Octave_object Ffgets (const Octave_object& args, int nargout) ; static builtin_function Sfgets = { "fgets" , 3 , 2 , 0 , Ffgets ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
58 "[STRING, LENGTH] = fgets (FILENAME or FILENUM, LENGTH)\n\nread a string from a file" }; install_builtin_function (& Sfgets );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
59 extern Octave_object Ffopen (const Octave_object& args, int nargout) ; static builtin_function Sfopen = { "fopen" , 3 , 1 , 0 , Ffopen ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
60 "FILENUM = fopen (FILENAME, MODE): open a file\n\n Valid values for mode include:\n\n r : open text file for reading\n w : open text file for writing; discard previous contents if any\n a : append; open or create text file for writing at end of file\n r+ : open text file for update (i.e., reading and writing)\n w+ : create text file for update; discard previous contents if any\n a+ : append; open or create text file for update, writing at end\n\n Update mode permits reading from and writing to the same file." }; install_builtin_function (& Sfopen );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
61 extern Octave_object Ffreport (const Octave_object& args, int nargout) ; static builtin_function Sfreport = { "freport" , 1 , 1 , 0 , Ffreport ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
62 "freport (): list open files and their status" }; install_builtin_function (& Sfreport );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
63 extern Octave_object Ffrewind (const Octave_object& args, int nargout) ; static builtin_function Sfrewind = { "frewind" , 2 , 1 , 0 , Ffrewind ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
64 "frewind (FILENAME or FILENUM): set file position at beginning of file" }; install_builtin_function (& Sfrewind );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
65 extern Octave_object Ffseek (const Octave_object& args, int nargout) ; static builtin_function Sfseek = { "fseek" , 4 , 1 , 0 , Ffseek ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
66 "fseek (FILENAME or FILENUM, OFFSET [, ORIGIN])\n\nset file position for reading or writing" }; install_builtin_function (& Sfseek );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
67 extern Octave_object Fftell (const Octave_object& args, int nargout) ; static builtin_function Sftell = { "ftell" , 2 , 1 , 0 , Fftell ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
68 "POSITION = ftell (FILENAME or FILENUM): returns the current file position" }; install_builtin_function (& Sftell );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
69 extern Octave_object Ffprintf (const Octave_object& args, int nargout) ; static builtin_function Sfprintf = { "fprintf" , -1 , 1 , 0 , Ffprintf ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
70 "fprintf (FILENAME or FILENUM, FORMAT, ...)" }; install_builtin_function (& Sfprintf );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
71 extern Octave_object Fprintf (const Octave_object& args, int nargout) ; static builtin_function Sprintf = { "printf" , -1 , 1 , 0 , Fprintf ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
72 "printf (FORMAT, ...)" }; install_builtin_function (& Sprintf );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
73 extern Octave_object Fsprintf (const Octave_object& args, int nargout) ; static builtin_function Ssprintf = { "sprintf" , -1 , 1 , 0 , Fsprintf ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
74 "s = sprintf (FORMAT, ...)" }; install_builtin_function (& Ssprintf );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
75 extern Octave_object Ffscanf (const Octave_object& args, int nargout) ; static builtin_function Sfscanf = { "fscanf" , 3 , -1 , 0 , Ffscanf ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
76 "[A, B, C, ...] = fscanf (FILENAME or FILENUM, FORMAT)" }; install_builtin_function (& Sfscanf );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
77 extern Octave_object Fscanf (const Octave_object& args, int nargout) ; static builtin_function Sscanf = { "scanf" , 2 , -1 , 0 , Fscanf ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
78 "[A, B, C, ...] = scanf (FORMAT)" }; install_builtin_function (& Sscanf );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
79 extern Octave_object Fsscanf (const Octave_object& args, int nargout) ; static builtin_function Ssscanf = { "sscanf" , 3 , -1 , 0 , Fsscanf ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
80 "[A, B, C, ...] = sscanf (STRING, FORMAT)" }; install_builtin_function (& Ssscanf );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
81 extern Octave_object Ffread (const Octave_object& args, int nargout) ; static builtin_function Sfread = { "fread" , 4 , 2 , 0 , Ffread ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
82 "[DATA, COUNT] = fread (FILENUM, SIZE, PRECISION)\n\n Reads data in binary form of type PRECISION from a file.\n\n FILENUM : file number from fopen\n SIZE : size specification for the Data matrix\n PRECISION : type of data to read, valid types are\n\n 'char', 'schar', 'short', 'int', 'long', 'float'\n 'double', 'uchar', 'ushort', 'uint', 'ulong'\n\n DATA : matrix in which the data is stored\n COUNT : number of elements read" }; install_builtin_function (& Sfread );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
83 extern Octave_object Ffwrite (const Octave_object& args, int nargout) ; static builtin_function Sfwrite = { "fwrite" , 4 , 1 , 0 , Ffwrite ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
84 "COUNT = fwrite (FILENUM, DATA, PRECISION)\n\n Writes data to a file in binary form of size PRECISION\n\n FILENUM : file number from fopen\n DATA : matrix of elements to be written\n PRECISION : type of data to read, valid types are\n\n 'char', 'schar', 'short', 'int', 'long', 'float'\n 'double', 'uchar', 'ushort', 'uint', 'ulong'\n\n COUNT : number of elements written" }; install_builtin_function (& Sfwrite );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
85 extern Octave_object Ffeof (const Octave_object& args, int nargout) ; static builtin_function Sfeof = { "feof" , 2 , 1 , 0 , Ffeof ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
86 "ERROR = feof (FILENAME or FILENUM)\n\n Returns a non zero value for an end of file condition for the\n file specified by FILENAME or FILENUM from fopen" }; install_builtin_function (& Sfeof );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
87 extern Octave_object Fferror (const Octave_object& args, int nargout) ; static builtin_function Sferror = { "ferror" , 2 , 1 , 0 , Fferror ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
88 "ERROR = ferror (FILENAME or FILENUM)\n\n Returns a non zero value for an error condition on the\n file specified by FILENAME or FILENUM from fopen" }; install_builtin_function (& Sferror );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
89 extern Octave_object Fhelp (const Octave_object& args, int nargout) ; static builtin_function Shelp = { "help" , -1 , 1 , 1 , Fhelp ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
90 "help [-i] [topic ...]\n\nprint cryptic yet witty messages" }; install_builtin_function (& Shelp );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
91 extern Octave_object Ftype (const Octave_object& args, int nargout) ; static builtin_function Stype = { "type" , -1 , 1 , 1 , Ftype ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
92 "type NAME ...]\n\ndisplay the definition of each NAME that refers to a function" }; install_builtin_function (& Stype );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
93 extern Octave_object Fwhich (const Octave_object& args, int nargout) ; static builtin_function Swhich = { "which" , -1 , 1 , 1 , Fwhich ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
94 "which NAME ...]\n\ndisplay the type of each NAME. If NAME is defined from an function\nfile, print the full name of the file." }; install_builtin_function (& Swhich );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
95 extern Octave_object Finput (const Octave_object& args, int nargout) ; static builtin_function Sinput = { "input" , 3 , 1 , 0 , Finput ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
96 "input (PROMPT [, S])\n\nPrompt user for input. If the second argument is present, return
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
97 value as a string." }; install_builtin_function (& Sinput );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
98 extern Octave_object Fkeyboard (const Octave_object& args, int nargout) ; static builtin_function Skeyboard = { "keyboard" , 2 , 1 , 0 , Fkeyboard ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
99 "keyboard (PROMPT)\n\nmaybe help in debugging function files" }; install_builtin_function (& Skeyboard );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
100 extern Octave_object Fload (const Octave_object& args, int nargout) ; static builtin_function Sload = { "load" , -1 , 1 , 1 , Fload ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
101 "load [-force] [-ascii] [-binary] [-mat-binary] file [pattern ...]\n
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
102 \nload variables from a file" }; install_builtin_function (& Sload );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
103 extern Octave_object Fsave (const Octave_object& args, int nargout) ; static builtin_function Ssave = { "save" , -1 , 1 , 1 , Fsave ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
104 "save [-ascii] [-binary] [-save-builtins] file [pattern ...]\n\nsave variables in a file" }; install_builtin_function (& Ssave );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
105 extern Octave_object Fcasesen (const Octave_object& args, int nargout) ; static builtin_function Scasesen = { "casesen" , 2 , 1 , 1 , Fcasesen ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
106 "casesen [on|off]" }; install_builtin_function (& Scasesen );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
107 extern Octave_object Fflops (const Octave_object& args, int nargout) ; static builtin_function Sflops = { "flops" , 2 , 1 , 0 , Fflops ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
108 "flops (): count floating point operations" }; install_builtin_function (& Sflops );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
109 extern Octave_object Fquit (const Octave_object& args, int nargout) ; static builtin_function Squit = { "quit" , 1 , 0 , 0 , Fquit ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
110 "quit (): exit Octave gracefully" }; install_builtin_function (& Squit );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
111 alias_builtin ("exit", "quit"); ;
31
19b973bc5464 [project @ 1993-08-10 21:48:36 by jwe]
jwe
parents: 19
diff changeset
112
605
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
113 extern Octave_object Fwarranty (const Octave_object& args, int nargout) ; static builtin_function Swarranty = { "warranty" , 1 , 0 , 0 , Fwarranty ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
114 "warranty (): describe copying conditions" }; install_builtin_function (& Swarranty );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
115 extern Octave_object Ffeval (const Octave_object& args, int nargout) ; static builtin_function Sfeval = { "feval" , -1 , 1 , 0 , Ffeval ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
116 "feval (NAME, ARGS, ...)\n\nevaluate NAME as a function, passing ARGS as its arguments" }; install_builtin_function (& Sfeval );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
117 extern Octave_object Feval (const Octave_object& args, int nargout) ; static builtin_function Seval = { "eval" , 2 , 1 , 0 , Feval ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
118 "eval (STRING): evaluate STRING as octave code" }; install_builtin_function (& Seval );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
119 extern Octave_object Fshell_cmd (const Octave_object& args, int nargout) ; static builtin_function Sshell_cmd = { "shell_cmd" , 2 , 1 , 0 , Fshell_cmd ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
120 "shell_cmd (string [, return_output]): execute shell commands" }; install_builtin_function (& Sshell_cmd );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
121 extern Octave_object Fedit_history (const Octave_object& args, int nargout) ; static builtin_function Sedit_history = { "edit_history" , -1 , 1 , 1 , Fedit_history ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
122 "edit_history [first] [last]\n\nedit commands from the history list" }; install_builtin_function (& Sedit_history );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
123 extern Octave_object Fhistory (const Octave_object& args, int nargout) ; static builtin_function Shistory = { "history" , -1 , 1 , 1 , Fhistory ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
124 "history [N] [-w file] [-r file] [-q]\n\ndisplay, save, or load command history" }; install_builtin_function (& Shistory );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
125 extern Octave_object Frun_history (const Octave_object& args, int nargout) ; static builtin_function Srun_history = { "run_history" , -1 , 1 , 1 , Frun_history ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
126 "run_history [first] [last]\n\nrun commands from the history list" }; install_builtin_function (& Srun_history );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
127 extern Octave_object Fdiary (const Octave_object& args, int nargout) ; static builtin_function Sdiary = { "diary" , -1 , 1 , 1 , Fdiary ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
128 "diary [on|off]\ndiary [file]\n\nredirect all input and screen output to a file." }; install_builtin_function (& Sdiary );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
129 extern Octave_object Fdisp (const Octave_object& args, int nargout) ; static builtin_function Sdisp = { "disp" , 3 , 1 , 0 , Fdisp ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
130 "disp (X): display value without name tag" }; install_builtin_function (& Sdisp );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
131 extern Octave_object Fformat (const Octave_object& args, int nargout) ; static builtin_function Sformat = { "format" , -1 , 1 , 1 , Fformat ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
132 "format [style]\n\nset output formatting style" }; install_builtin_function (& Sformat );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
133 extern Octave_object Fclc (const Octave_object& args, int nargout) ; static builtin_function Sclc = { "clc" , 1 , 0 , 0 , Fclc ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
134 "clc (): clear screen" }; install_builtin_function (& Sclc );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
135 alias_builtin ("home", "clc"); ;
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
136
605
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
137 extern Octave_object Fgetenv (const Octave_object& args, int nargout) ; static builtin_function Sgetenv = { "getenv" , 2 , 1 , 0 , Fgetenv ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
138 "getenv (STRING): get environment variable values" }; install_builtin_function (& Sgetenv );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
139 extern Octave_object Fkbhit (const Octave_object& args, int nargout) ; static builtin_function Skbhit = { "kbhit" , 1 , 1 , 0 , Fkbhit ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
140 "kbhit: get a single character from the terminal" }; install_builtin_function (& Skbhit );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
141 extern Octave_object Fpause (const Octave_object& args, int nargout) ; static builtin_function Spause = { "pause" , 1 , 1 , 0 , Fpause ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
142 "pause (seconds): suspend program execution" }; install_builtin_function (& Spause );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
143 extern Octave_object Fclock (const Octave_object& args, int nargout) ; static builtin_function Sclock = { "clock" , 1 , 0 , 0 , Fclock ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
144 "clock (): return current date and time in vector with elements\n\n [ year, month, day-of-month, hour, minute, second ]" }; install_builtin_function (& Sclock );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
145 extern Octave_object Fdate (const Octave_object& args, int nargout) ; static builtin_function Sdate = { "date" , 1 , 0 , 0 , Fdate ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
146 "date (): return current date in a string, in the form `18-Jul-94'" }; install_builtin_function (& Sdate );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
147 extern Octave_object Fva_arg (const Octave_object& args, int nargout) ; static builtin_function Sva_arg = { "va_arg" , 1 , 1 , 0 , Fva_arg ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
148 "va_arg (): return next argument in a function that takes a\nvariable number of parameters" }; install_builtin_function (& Sva_arg );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
149 extern Octave_object Fva_start (const Octave_object& args, int nargout) ; static builtin_function Sva_start = { "va_start" , 1 , 0 , 0 , Fva_start ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
150 "va_start (): reset the pointer to the list of optional arguments\nto the beginning" }; install_builtin_function (& Sva_start );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
151 extern Octave_object Fcloseplot (const Octave_object& args, int nargout) ; static builtin_function Scloseplot = { "closeplot" , 1 , 0 , 0 , Fcloseplot ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
152 "closeplot (): close the stream to plotter" }; install_builtin_function (& Scloseplot );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
153 extern Octave_object Fhold (const Octave_object& args, int nargout) ; static builtin_function Shold = { "hold" , -1 , 1 , 1 , Fhold ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
154 "hold [on|off]\n\ndetermine whether the plot window is cleared before the next line is\ndrawn. With no argument, toggle the current state." }; install_builtin_function (& Shold );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
155 extern Octave_object Fpurge_tmp_files (const Octave_object& args, int nargout) ; static builtin_function Spurge_tmp_files = { "purge_tmp_files" , 5 , 1 , 0 , Fpurge_tmp_files ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
156 "delete temporary data files used for plotting" }; install_builtin_function (& Spurge_tmp_files );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
157 extern Octave_object Fset (const Octave_object& args, int nargout) ; static builtin_function Sset = { "set" , -1 , 1 , 1 , Fset ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
158 "set [options]\n\nset plotting options" }; install_builtin_function (& Sset );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
159 extern Octave_object Fshow (const Octave_object& args, int nargout) ; static builtin_function Sshow = { "show" , -1 , 1 , 1 , Fshow ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
160 "show [options]\n\nshow plotting options" }; install_builtin_function (& Sshow );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
161 extern Octave_object Fis_global (const Octave_object& args, int nargout) ; static builtin_function Sis_global = { "is_global" , 2 , 1 , 0 , Fis_global ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
162 "is_global (X): return 1 if the string X names a global variable\notherwise, return 0." }; install_builtin_function (& Sis_global );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
163 extern Octave_object Fexist (const Octave_object& args, int nargout) ; static builtin_function Sexist = { "exist" , 2 , 1 , 0 , Fexist ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
164 "exist (NAME): check if variable or file exists\n\nreturn 0 if NAME is undefined, 1 if it is a variable, or 2 if it is\na function." }; install_builtin_function (& Sexist );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
165 extern Octave_object Fdocument (const Octave_object& args, int nargout) ; static builtin_function Sdocument = { "document" , -1 , 1 , 1 , Fdocument ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
166 "document symbol string ...\n\nAssociate a cryptic message with a variable name." }; install_builtin_function (& Sdocument );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
167 extern Octave_object Fwho (const Octave_object& args, int nargout) ; static builtin_function Swho = { "who" , -1 , 1 , 1 , Fwho ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
168 "who [-all] [-builtins] [-functions] [-long] [-variables]\n\nList currently defined symbol(s). Options may be shortened to one\ncharacter, but may not be combined." }; install_builtin_function (& Swho );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
169 extern Octave_object Fwhos (const Octave_object& args, int nargout) ; static builtin_function Swhos = { "whos" , -1 , 1 , 1 , Fwhos ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
170 "whos [-all] [-builtins] [-functions] [-long] [-variables]\n\nList currently defined symbol(s). Options may be shortened to one\ncharacter, but may not be combined." }; install_builtin_function (& Swhos );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
171 extern Octave_object Fclear (const Octave_object& args, int nargout) ; static builtin_function Sclear = { "clear" , -1 , 1 , 1 , Fclear ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
172 "clear [name ...]\n\nclear symbol(s) matching a list of globbing patterns\nif no arguments are given, clear all user-defined variables and functions" }; install_builtin_function (& Sclear );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
173 extern Octave_object Fbalance (const Octave_object& args, int nargout) ; static builtin_function Sbalance = { "balance" , 4 , 4 , 0 , Fbalance ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
174 "AA = balance (A [, OPT]) or [[DD,] AA] = balance (A [, OPT])\n\ngeneralized eigenvalue problem:\n\n [cc, dd, aa, bb] = balance (a, b [, opt])\n\nwhere OPT is an optional single character argument as follows: \n\n N: no balancing; arguments copied, transformation(s) set to identity\n P: permute argument(s) to isolate eigenvalues where possible\n S: scale to improve accuracy of computed eigenvalues\n B: (default) permute and scale, in that order. Rows/columns\n of a (and b) that are isolated by permutation are not scaled\n\n[DD, AA] = balance (A, OPT) returns aa = dd\a*dd,\n\n[CC, DD, AA, BB] = balance (A, B, OPT) returns AA (BB) = CC*A*DD (CC*B*DD)" }; install_builtin_function (& Sbalance );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
175 extern Octave_object Fchol (const Octave_object& args, int nargout) ; static builtin_function Schol = { "chol" , 2 , 1 , 0 , Fchol ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
176 "R = chol (X): cholesky factorization" }; install_builtin_function (& Schol );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
177 extern Octave_object Fcolloc (const Octave_object& args, int nargout) ; static builtin_function Scolloc = { "colloc" , 7 , 4 , 0 , Fcolloc ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
178 "[R, A, B, Q] = colloc (N [, \"left\"] [, \"right\"]): collocation weights" }; install_builtin_function (& Scolloc );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
179 extern Octave_object Fdassl (const Octave_object& args, int nargout) ; static builtin_function Sdassl = { "dassl" , 5 , 1 , 0 , Fdassl ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
180 "dassl (\"function_name\", x_0, xdot_0, t_out)\ndassl (F, X_0, XDOT_0, T_OUT, T_CRIT)\n\nThe first argument is the name of the function to call to\ncompute the vector of residuals. It must have the form\n\n res = f (x, xdot, t)\n\nwhere x, xdot, and res are vectors, and t is a scalar." }; install_builtin_function (& Sdassl );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
181 extern Octave_object Fdassl_options (const Octave_object& args, int nargout) ; static builtin_function Sdassl_options = { "dassl_options" , -1 , 1 , 0 , Fdassl_options ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
182 "dassl_options (KEYWORD, VALUE)\n\nSet or show options for dassl. Keywords may be abbreviated\nto the shortest match." }; install_builtin_function (& Sdassl_options );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
183 extern Octave_object Fdet (const Octave_object& args, int nargout) ; static builtin_function Sdet = { "det" , 2 , 1 , 0 , Fdet ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
184 "det (X): determinant of a square matrix" }; install_builtin_function (& Sdet );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
185 extern Octave_object Feig (const Octave_object& args, int nargout) ; static builtin_function Seig = { "eig" , 2 , 1 , 0 , Feig ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
186 "eig (X) or [V, D] = eig (X): compute eigenvalues and eigenvectors of X" }; install_builtin_function (& Seig );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
187 extern Octave_object Fexpm (const Octave_object& args, int nargout) ; static builtin_function Sexpm = { "expm" , 2 , 1 , 0 , Fexpm ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
188 "expm (X): matrix exponential, e^A" }; install_builtin_function (& Sexpm );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
189 extern Octave_object Ffft (const Octave_object& args, int nargout) ; static builtin_function Sfft = { "fft" , 2 , 1 , 0 , Ffft ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
190 "fft (X): fast fourier transform of a vector" }; install_builtin_function (& Sfft );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
191 extern Octave_object Ffind (const Octave_object& args, int nargout) ; static builtin_function Sfind = { "find" , 2 , 3 , 0 , Ffind ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
192 "find (X) or [I, J, V] = find (X): Return indices of nonzero elements" }; install_builtin_function (& Sfind );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
193 extern Octave_object Ffsolve (const Octave_object& args, int nargout) ; static builtin_function Sfsolve = { "fsolve" , 5 , 1 , 0 , Ffsolve ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
194 "Solve nonlinear equations using Minpack. Usage:\n\n [X, INFO] = fsolve (F, X0)\n\nWhere the first argument is the name of the function to call to\ncompute the vector of function values. It must have the form\n\n y = f (x)
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
195 \nwhere y and x are vectors." }; install_builtin_function (& Sfsolve );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
196 extern Octave_object Ffsolve_options (const Octave_object& args, int nargout) ; static builtin_function Sfsolve_options = { "fsolve_options" , -1 , 1 , 0 , Ffsolve_options ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
197 "fsolve_options (KEYWORD, VALUE)\n\nSet or show options for fsolve. Keywords may be abbreviated\nto the shortest match." }; install_builtin_function (& Sfsolve_options );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
198 extern Octave_object Ffsqp (const Octave_object& args, int nargout) ; static builtin_function Sfsqp = { "fsqp" , 11 , 3 , 0 , Ffsqp ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
199 "[X, PHI] = fsqp (X, PHI [, LB, UB] [, LB, A, UB] [, LB, G, UB])\n\nGroups of arguments surrounded in `[]' are optional, but\nmust appear in the same relative order shown above." }; install_builtin_function (& Sfsqp );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
200 extern Octave_object Ffsqp_options (const Octave_object& args, int nargout) ; static builtin_function Sfsqp_options = { "fsqp_options" , -1 , 1 , 0 , Ffsqp_options ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
201 "fsqp_options (KEYWORD, VALUE)\n\nSet or show options for fsqp. Keywords may be abbreviated\nto the shortest match." }; install_builtin_function (& Sfsqp_options );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
202 extern Octave_object Fgivens (const Octave_object& args, int nargout) ; static builtin_function Sgivens = { "givens" , 3 , 2 , 0 , Fgivens ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
203 "G = givens (X, Y)\n\ncompute orthogonal matrix G = [c s; -conj (s) c]\nsuch that G [x; y] = [*; 0] (x, y scalars)\n\n[c, s] = givens (x, y) returns the (c, s) values themselves." }; install_builtin_function (& Sgivens );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
204 extern Octave_object Fhess (const Octave_object& args, int nargout) ; static builtin_function Shess = { "hess" , 2 , 2 , 0 , Fhess ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
205 "[P, H] = hess (A) or H = hess (A): Hessenberg decomposition" }; install_builtin_function (& Shess );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
206 extern Octave_object Fifft (const Octave_object& args, int nargout) ; static builtin_function Sifft = { "ifft" , 2 , 1 , 0 , Fifft ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
207 "ifft (X): inverse fast fourier transform of a vector" }; install_builtin_function (& Sifft );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
208 extern Octave_object Finv (const Octave_object& args, int nargout) ; static builtin_function Sinv = { "inv" , 2 , 1 , 0 , Finv ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
209 "inv (X): inverse of a square matrix" }; install_builtin_function (& Sinv );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
210 extern Octave_object Flogm (const Octave_object& args, int nargout) ; static builtin_function Slogm = { "logm" , 2 , 1 , 0 , Flogm ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
211 "logm (X): matrix logarithm" }; install_builtin_function (& Slogm );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
212 extern Octave_object Fsqrtm (const Octave_object& args, int nargout) ; static builtin_function Ssqrtm = { "sqrtm" , 2 , 1 , 0 , Fsqrtm ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
213 "sqrtm (X): matrix sqrt" }; install_builtin_function (& Ssqrtm );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
214 extern Octave_object Flpsolve (const Octave_object& args, int nargout) ; static builtin_function Slpsolve = { "lpsolve" , 11 , 3 , 0 , Flpsolve ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
215 "lp_solve (): solve linear programs using lp_solve." }; install_builtin_function (& Slpsolve );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
216 extern Octave_object Flpsolve_options (const Octave_object& args, int nargout) ; static builtin_function Slpsolve_options = { "lpsolve_options" , -1 , 1 , 0 , Flpsolve_options ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
217 "lp_solve_options (KEYWORD, VALUE)\n\nSet or show options for lp_solve. Keywords may be abbreviated\nto the shortest match." }; install_builtin_function (& Slpsolve_options );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
218 extern Octave_object Flsode (const Octave_object& args, int nargout) ; static builtin_function Slsode = { "lsode" , 6 , 1 , 0 , Flsode ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
219 "lsode (F, X0, T_OUT, T_CRIT)\n\nThe first argument is the name of the function to call to\ncompute the vector of right hand sides. It must have the form\n\n xdot = f (x, t)\n\nwhere xdot and x are vectors and t is a scalar.\n" }; install_builtin_function (& Slsode );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
220 extern Octave_object Flsode_options (const Octave_object& args, int nargout) ; static builtin_function Slsode_options = { "lsode_options" , -1 , 1 , 0 , Flsode_options ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
221 "lsode_options (KEYWORD, VALUE)\n\nSet or show options for lsode. Keywords may be abbreviated\nto the shortest match." }; install_builtin_function (& Slsode_options );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
222 extern Octave_object Flu (const Octave_object& args, int nargout) ; static builtin_function Slu = { "lu" , 2 , 3 , 0 , Flu ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
223 "[L, U, P] = lu (A): LU factorization" }; install_builtin_function (& Slu );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
224 extern Octave_object Fmin (const Octave_object& args, int nargout) ; static builtin_function Smin = { "min" , 3 , 2 , 0 , Fmin ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
225 "min (X): minimum value(s) of a vector (matrix)" }; install_builtin_function (& Smin );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
226 extern Octave_object Fmax (const Octave_object& args, int nargout) ; static builtin_function Smax = { "max" , 3 , 2 , 0 , Fmax ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
227 "max (X): maximum value(s) of a vector (matrix)" }; install_builtin_function (& Smax );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
228 extern Octave_object Fnpsol (const Octave_object& args, int nargout) ; static builtin_function Snpsol = { "npsol" , 11 , 3 , 0 , Fnpsol ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
229 "[X, OBJ, INFO, LAMBDA] = npsol (X, PHI [, LB, UB] [, LB, A, UB] [, LB, G, UB])\n\nGroups of arguments surrounded in `[]' are optional, but\nmust appear in the same relative order shown above.\n\nThe second argument is a string containing the name of the objective\nfunction to call. The objective function must be of the form\n\n y = phi (x)\n\nwhere x is a vector and y is a scalar.\n\nThe argument G is a string containing the name of the function that
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
230 defines the nonlinear constraints. It must be of the form\n\n y = g (x)\n\nwhere x is a vector and y is a vector." }; install_builtin_function (& Snpsol );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
231 extern Octave_object Fnpsol_options (const Octave_object& args, int nargout) ; static builtin_function Snpsol_options = { "npsol_options" , -1 , 1 , 0 , Fnpsol_options ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
232 "npsol_options (KEYWORD, VALUE)\n\nSet or show options for npsol. Keywords may be abbreviated\nto the shortest match." }; install_builtin_function (& Snpsol_options );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
233 extern Octave_object Fqpsol (const Octave_object& args, int nargout) ; static builtin_function Sqpsol = { "qpsol" , 9 , 3 , 0 , Fqpsol ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
234 "[X, OBJ, INFO, LAMBDA] = qpsol (X, H, C [, LB, UB] [, LB, A, UB])\n\nGroups of arguments surrounded in `[]' are optional, but\nmust appear in the same relative order shown above." }; install_builtin_function (& Sqpsol );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
235 extern Octave_object Fqpsol_options (const Octave_object& args, int nargout) ; static builtin_function Sqpsol_options = { "qpsol_options" , -1 , 1 , 0 , Fqpsol_options ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
236 "qpsol_options (KEYWORD, VALUE)\n
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
237 \nSet or show options for qpsol. Keywords may be abbreviated\nto the shortest match." }; install_builtin_function (& Sqpsol_options );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
238 extern Octave_object Fqr (const Octave_object& args, int nargout) ; static builtin_function Sqr = { "qr" , 2 , 2 , 0 , Fqr ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
239 "[Q, R] = qr (X): form Q unitary and R upper triangular such\n that Q * R = X\n\n[Q, R] = qr (X, 0): form the economy decomposition such that if X is\n if X is m by n then only the first n columns of Q\n are computed.\n\n[Q, R, P] = qr (X): form QRP factorization of X where\n P is a permutation matrix such that\n A * P = Q * R\n\n[Q, R, P] = qr (X, 0): form the economy decomposition with \n permutation vector P such that Q * R = X (:, P)\n\nqr (X) alone returns the output of the LAPACK routine dgeqrf, such\nthat R = triu (qr (X))" }; install_builtin_function (& Sqr );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
240 extern Octave_object Fquad (const Octave_object& args, int nargout) ; static builtin_function Squad = { "quad" , 6 , 3 , 0 , Fquad ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
241 "[V, IER, NFUN] = quad (F, A, B [, TOL] [, SING])\n\nWhere the first argument is the name of the function to call to\ncompute the value of the integrand. It must have the form\n\n y = f (x)
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
242 \nwhere y and x are scalars.\n\nThe second and third arguments are limits of integration. Either or\nboth may be infinite. The optional argument TOL specifies the desired\naccuracy of the result. The optional argument SING is a vector of\nat which the integrand is singular." }; install_builtin_function (& Squad );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
243 extern Octave_object Fquad_options (const Octave_object& args, int nargout) ; static builtin_function Squad_options = { "quad_options" , -1 , 1 , 0 , Fquad_options ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
244 "quad_options (KEYWORD, VALUE)\n\nSet or show options for quad. Keywords may be abbreviated\nto the shortest match." }; install_builtin_function (& Squad_options );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
245 extern Octave_object Fqzvalue (const Octave_object& args, int nargout) ; static builtin_function Sqzvalue = { "qzvalue" , 3 , 1 , 0 , Fqzvalue ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
246 "X = qzval (A, B)\n\ncompute generalized eigenvalues of the matrix pencil (A - lambda B).\nA and B must be real matrices." }; install_builtin_function (& Sqzvalue );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
247 extern Octave_object Frand (const Octave_object& args, int nargout) ; static builtin_function Srand = { "rand" , 2 , 1 , 0 , Frand ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
248 "rand -- generate a random value\n\nrand (N) -- generate N x N matrix\nrand (A) -- generate matrix the size of A\nrand (N, M) -- generate N x M matrix\nrand (\"dist\") -- get current distribution\nrand (DISTRIBUTION) -- set distribution type (\"normal\" or \"uniform\"\nrand (SEED) -- get current seed\nrand (SEED, N) -- set seed" }; install_builtin_function (& Srand );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
249 extern Octave_object Fschur (const Octave_object& args, int nargout) ; static builtin_function Sschur = { "schur" , 3 , 2 , 0 , Fschur ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
250 "[U, S] = schur (A) or S = schur (A)\n\nor, for ordered Schur:\n\n [U, S] = schur (A, TYPE) or S = schur (A, TYPE)\nwhere TYPE is a string that begins with one of the following\ncharacters:\n\n A = continuous time poles\n D = discrete time poles\n U = unordered schur (default)" }; install_builtin_function (& Sschur );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
251 extern Octave_object Fsort (const Octave_object& args, int nargout) ; static builtin_function Ssort = { "sort" , 2 , 2 , 0 , Fsort ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
252 "[S, I] = sort (X)\n\nsort the columns of X, optionally return sort index" }; install_builtin_function (& Ssort );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
253 extern Octave_object Fsvd (const Octave_object& args, int nargout) ; static builtin_function Ssvd = { "svd" , 2 , 3 , 0 , Fsvd ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
254 "S = svd (X) or [U, S, V] = svd (X [, 0])\n\nCompute the singular value decomposition of X. Given a second input\nargument, an `economy' sized factorization is computed that omits\nunnecessary rows and columns of U and V" }; install_builtin_function (& Ssvd );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
255 extern Octave_object Fsyl (const Octave_object& args, int nargout) ; static builtin_function Ssyl = { "syl" , 4 , 1 , 0 , Fsyl ,
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
256 "X = syl (A, B, C): solve the Sylvester equation A X + X B + C = 0" }; install_builtin_function (& Ssyl );
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
257 }
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
258
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
259 void
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
260 install_builtins (void)
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
261 {
605
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
262 install_builtin_variables ();
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
263 install_mapper_functions ();
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 511
diff changeset
264 install_builtin_functions ();
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
265 }