- Scilab help
- Functions
- Built-in & external
- Libraries
- profiling
- argn
- bytecode
- bytecodewalk
- comp
- deff
- edit
- exec
- execstr
- fun2string
- funcprot
- function
- functions
- getd
- head_comments
- listfunctions
- macr2lst
- macr2tree
- macro
- macrovar
- mode
- overloading
- recompilefunction
- sciargs
- tree2code
- varargin
- varargout
- code2str
- str2code
Please note that the recommended version of Scilab is 2026.0.0. This page might be outdated.
See the recommended documentation of this function
deff
関数のオンライン定義
呼び出し手順
deff('[s1,s2,...]=newfunction(e1,e2,....)',text [,opt])
パラメータ
- e1,e2,...,
- 入力変数. 
- s1,s2,...,
- 出力変数. 
- text
- 文字列行列 
- opt
- オプションの文字列 - 'c'
- 実行効率改善のために関数は "コンパイル" されます (デフォルト) 
- 'p'
- 関数は"コンパイル"され, プロファイルに備えます (profile参照) 
- 'n'
- 関数は"コンパイル"されません 
 
説明
deff はテキスト文字列で記述された一連の命令から
            関数を定義する際に使用されます.
            得られる関数オブジェクトはテキストファイルで定義され,
            exec または exec で
            定義された他の関数と同じ特性を有しています.
命令の中の引用符(文字列の区切りまたは行列の転置を意味する)は,
            ただしく解釈されるように二重化する必要があります(quoteのヘルプを参照).
            この仕様のため,作成作業はやや不便となります.
            このような場合のオプションとしては,通常と同様に関数を
            ファイルで定義し,
            ('n' オプションを付けて)
            execによりScilabにロードし,
            deff 命令と同じ出力を得るために
            sci2expを使用するという方法があります.
例
deff('[x]=myplus(y,z)','x=y+z') deff('[x]=mymacro(y,z)',['a=3*y+1'; 'x=a*z+y'])
参照
| Report an issue | ||
| << comp | Functions | edit >> |