- Scilab help
- Scilab
- Scilab keywords
- TMPDIR
- abort
- add_demo
- argn
- banner
- boolean
- break
- clear
- clearfun
- clearglobal
- comp
- continue
- debug
- delbpt
- dispbpt
- edit
- errcatch
- errclear
- error
- error_table
- exists
- exit
- external
- extraction
- format
- funcprot
- funptr
- getdebuginfo
- getmd5
- getmemory
- getmodules
- getos
- getscilabmode
- getshell
- getvariablesonstack
- getversion
- gstacksize
- ieee
- insertion
- intppty
- inv_coeff
- iserror
- isglobal
- lasterror
- macr2lst
- macr2tree
- matrices
- matrix
- mode
- mtlb_mode
- names
- newfun
- null
- pause
- perl
- poly
- predef
- quit
- rational
- readgateway
- resume
- sciargs
- scilab
- setbpt
- sethomedirectory
- stacksize
- startup
- symbols
- testmatrix
- type
- typename
- user
- varn
- ver
- warning
- what
- where
- whereami
- who
- who_user
- whos
- with_atlas
- with_gtk
- with_javasci
- with_macros_source
- with_module
- with_pvm
- with_texmacs
- with_tk
external
Scilabオブジェクト, 外部関数またはルーチン
説明
特定のコマンド要の外部関数またはルーチン.
"external" は,
(ode, optim, schur...
のような)
いくつかの高レベルプリミティブの引数として使用される
関数またはルーチンです.
external (関数またはルーチン)の呼び出し手順は, external の引数を設定する高レベルプリミティブにより 規定されています.
例えば, 外部関数 costfunc は,
optim プリミティブの引数です.
その呼出し手順は次のようになります: [f,g,ind]=costfunc(x,ind)
そして optim (高レベル最適化プリミティブ)は
以下のようにコールされます
optim(costfunc,...)
ここで, costfunc (評価関数はプリミティブ
optimにより最小化されます)は,
f=f(x) およびxにおける
fの傾きgを評価します
(ind は整数です. その使用法は
optimヘルプに詳述されています).
その他の値が外部関数により必要とされる場合, これらの変数をその環境において定義することができます. また, 外部関数をリスト内に置くことができます. 例えば,外部関数
[f,g,ind]=costfunc(x,ind,a,b,c)
は, external が
list(costfunc,a,b,c)の場合,
optimに適用できます.
そして, optimへのコールは
以下のようになります:
externalはFortranまたはCルーチンとすることもできます: これは計算を高速化するために有用です.
ルーチンの名前は文字列として高レベルプリミティブに 指定することができます. このルーチンの呼び出し手順も規定されています.
外部FortranまたはCルーチンも動的にリンクできます
(link参照).
参照
| << exit | Scilab | extraction >> |