File: deff.cat

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (42 lines) | stat: -rw-r--r-- 1,488 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
deff             Scilab Group             Scilab Function              deff
NAME
   deff - on-line definition of function
  
CALLING SEQUENCE
 deff('[s1,s2,...]=newfunction(e1,e2,....)',text [,opt])
PARAMETERS
 e1,e2,...,      : input variables.
                 
 s1,s2,...,      : output variables.
                 
 text            : matrix of character strings
                 
 opt             : optional character string 
                 
                'c'  : function is "compiled" to be more efficient
                     (default)
                     
                'n'  : function is not "compiled"
                     
DESCRIPTION
   On-line definition of function (user defined function): the name of the 
  created function is newfunction. text is a sequence of instructions
  usually set as a vector of  character strings.
  
   This command can be used inside a function and the new function can be an
  input or output of any other function.
  
   Usually, functions are defined in a file and loaded into Scilab by getf
  
   Some time, in particular when you want to use define strings within deff
  text is rather difficult to write. A more tractable way may be to define
  your function in a file as usual, to load it into Scilab by getf (without
  'c'  option) and use sci2exp to get corresponding deff instructions.
  
EXAMPLES
 deff('[x]=myplus(y,z)','x=y+z')
 //
 deff('[x]=mymacro(y,z)',['a=3*y+1'; 'x=a*z+y'])
SEE ALSO
   getf, comp, exec, function