Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2023.0.0 - 日本語


scilab

Scilabおよび関連ツールを起動するためのツール

呼出し手順

scilab <Options>

説定

The list of Scilab launching options -- including options for developers -- can be displayed in the OS terminal through the --help option.

unix_w(SCI+"/bin/scilab --help 2>&1")
--> unix_w(SCI+"/bin/scilab --help 2>&1")
Usage: Scilab <options>
      -args arg1 arg2..: Send directly some arg1 arg2 .. data to the session.
                         arg1 arg2 .. values can then be read through sciargs().
      -e Instruction   : Execute the scilab instruction given in Instruction argument.
                         -e and -f arguments are mutually exclusive.
      -f File          : Execute the scilab script given in File argument.
                         -e and -f arguments are mutually exclusive.
      -quit            : force scilab exit after execution of script from -e or -f argument.
                         Flag ignored if it is not used with -e or -f argument.
      -l lang          : Change the language of scilab (default : en_US).
      -nw              : Enable console mode.
      -nwni            : Enable terminal mode.
      -ns              : Do not execute etc/scilab.start.
      -nouserstartup   : Do not execute user startup files (SCIHOME/scilab.ini|.scilab).
      -noatomsautoload : Do not autoload eligible ATOMS modules.
      -nb              : Do not display the banner (no banner).
      -scihome <dir>   : Force SCIHOME to <dir>.
      -texmacs         : Option to use Scilab from documents through http://texmacs.org.
      -version         : Display the Scilab version (no session opened).
      -display Display : Set the display to the X server Display (XWindow systems only).
                         unix:0.0 is the default.
      --help           : Display this help.

Developer Trace arguments:
      --parse-trace    : Display bison state machine evolution.
      --AST-trace      : Display ASCII-art AST to be human readable.
      --pretty-print   : Display pretty-printed code, standard Scilab syntax.

Developer Timer arguments:
      --AST-timed      : Time each AST node.
      --timed          : Time global execution.

Developer Debug arguments:
      --no-exec        : Only do Lexing/parsing do not execute instructions.
      --context-dump   : Display context status.
      --exec-verbose   : Display command before running it.
      --timeout delay  : Kill the Scilab process after a delay.

They are described below.

-args arg#1 arg#2 ..

This option allows to send some data to the Scilab session:

  • Consecutive data are separated by one or several spaces.
  • An expression between double-quotes is a single data.
  • To include a double-quote in a data, write \" instead of ".
  • The single quote ' is a regular character. It has no special meaning.

Inside the opened session, these data can be retrieved as separated strings with sciargs().

Example:

C:\Users\Me> C:\SCIdir\bin\scilab -nw -nb -noatomsautoload -args "Hello %USERNAME%" 1.2345 \"%cd%\"
// Inside the opened session:
a = sciargs()
i = find(a=="-args")
a(i+1)
evstr(a(i+2))*2
"This session has been launched from " + a(i+3)
--> // Inside the opened session:
--> a = sciargs()
 a  =
! c:\SCIdir\bin\WScilex-cli.exe !
! -nb                           !
! -noatomsautoload              !
! -args                         !
! Hello John                    !
! 1.2345                        !
! "C:\Users\Me"                 !

--> i = find(a=="-args")
 i  =
    5.

--> a(i+1)
 ans  =
 Hello John

--> evstr(a(i+2))*2
 ans  =
    2.469

--> "This session has been launched from " + a(i+3)
 ans  =
 This session has been launched from "C:\Users\Me"

Note here that > scilab -nw has been translated into Wscilex-cli.exe by the scilab batch file, in such a way that the "-nw" option is not returned by sciargs() (see further below).

Using -args as the last command line option is safer.

-display Display

Xwindow システム上でのみ使用可能で, 表示する Xサーバーを指定します. デフォルトの表示先は unix:0.0 です.

-display は, -dと短縮形で指定できます.

-e Instructions

At the end of the whole session startup, this option

  • sets the current working directory to the shell directory from which Scilab has been launched. Please see the example given here-below for the -f option. Then,

  • executes Scilab Instructions provided in a string. Example:

    OS> scilab -nw -e  "disp(\"Hello\"); a=%pi+%i; disp(exp(a)); exit;" -nb

-e および -f オプションは相互に排他的です.
-f file

If this option is used, then at the beginning of the Scilab session, after the execution of the scilab and user startup files, and after the setting of user Preferences -- including the working directory ones --,

  • the current Scilab working directory is set to the shell directory from which Scilab has been launched. For instance,

     D:\users\me\scilab\dev> C:\SCIdir\bin\scilab -f ..\test.sce
    will do a cd("D:\users\me\scilab\dev").

  • the Scilab script file is executed. If a relative path is used (default .\, or like ..\ in the sample here-above), it refers to the new Scilab working directory.

.xcos 拡張子を有するファイルはXcosで開かれます.

-quit

This option forces scilab to always exit after the instruction(s) passed with the -e option, or the script referred to by the -f option, have been executed, even in case of a runtime error. This option should always be used in batch mode. It is ignored if neither -e nor -f options are present.

-l lang

このオプションを指定した場合, ユーザ言語を指定します. lang は以下の値を指定できます: ca_ES de_DE en_US es_ES fr_FR ja_JP pt_BR ru_RU zh_CN zh_TW

互換性維持のため,その他に lang の値は,フランス語として 'fr' および英語として 'en' を使用可能です, or 'pt' for Brasilian Portuguese.

On Windows, in "-nw" or "-nwni" modes, the selected font of the terminal must be a TrueType one to support UTF-8 characters, like Monospaced (best choice if available) or Consolas or Lucida Console..

いくつかのシステムでは,UTF-8フォントを正しく描画するために, ロケールをコンパイルする必要があります.

-nb

"no banner" : このオプションが指定された場合, Scilabの Welcome バナーは表示されません.

-ns

"No Startup files" : このオプションが指定された場合, スタートアップファイル SCI/etc/scilab.start およびユーザスタートアップファイル SCIHOME/.scilab, SCIHOME/scilab.ini は実行されません.

このオプションは, Scilabの多くの機能を無効にします (動作を理解している場合のみ 使用してください).

-nouserstartup

このオプションが指定された場合, スタートアップファイル SCIHOME/.scilab, SCIHOME/scilab.ini は実行されません.

-noatomsautoload

このオプションが指定された場合,イントール済みのATOMモジュールは このセッションでロードされません.

-nw

このオプションが指定された場合, Scilab は 先進的な機能(グラフィック, export, xcos, scinotes, ヘルプブラウザ, ...) と共にコマンドラインで起動されます.

全てのオペレーティングシステムについて パイプが有効です (詳細については例を参照ください).

Scilab のディストリビューションには, -nwと同様のバイナリを提供します:

  • Windows: WScilex-cli.exe.
  • on Linux and MacOS: scilab-adv-cli (Scilab Advanced Command Line Interpreter).

-nwni / -nogui
このモードでは Java 仮想マシンはロードされません. (起動は高速化され,メモリ消費量は減少します)

このオプションが指定された場合, Scilab は先進的な機能 (グラフィック, export, xcos, scinotes, ヘルプブラウザ, ...)なしで コマンドラインで起動されます.

全てのオペレーティングシステムについて パイプが有効です (詳細については例を参照ください).

Scilab のディストリビューションでは, -nwniと同じ専用バイナリが提供されています

  • Windows: Scilex.exe.
  • Others: scilab-cli (Scilab Command Line Interpreter).

-scihome dir

Forces SCIHOME to the dir directory. If the path includes some white space, it must be specified between double-quotes (no single quotes!). if dir is a relative path, dir is add to parent standard SCIHOME folder.

On Windows: %USERPROFILE%\AppData\Roaming\Scilab\dir
On Linux/MacOS: ~/.Scilab/dir

--texmacs

This option is used when Scilab is used as computational interface within the TeXmacs scientific editor, using the TeXmacs ATOMS module. This one can be priorly installed in Scilab with atomsInstall('texmacs').

-version

このオプションはプロダクトのバージョンを出力し,終了します. No Scilab session is opened.

Additional options for Unix/Linux and Mac OS X

助言: これらのオプションをScilabソースツリー上で使用してください.

-debug

デバッガgdb上でScilabを開始します.

gdb にカスタムオプションを追加する場合, 変数SCILAB_GDB_OPTを定義します.

-debug-rr

rr上でScilabを開始します.

-debug-kdbg

kdbg上でScilabを開始します.

-profiling

valgrind上でScilabを開始します.

valgrind にカスタムオプションを追加する場合 (および既存の valgrind オプションを上書きする場合),SCILAB_VALGRIND_OPT を定義してください.

-profiling-visu

callgrind上でScilabを開始します.

callgrind にカスタムオプションを追加する場合 (および既存の callgrind オプションを上書きする場合),SCILAB_VALGRIND_OPT を定義してください.

-electric-fence

Electric Fence を指定して Scilab を開始します.

環境変数の説明

SCIVERBOSE

この変数が存在した場合, Scilab起動スクリプトは起動時デバッグ情報を表示します. 主にバグレポートおよびデバッグ目的で使用されます.

JAVA_HOME

使用するJavaを指定します. 例えば, JAVA_HOME=/usr/lib/jvm/java-7-openjdk/ scilab は Java 7 でScilabを起動します.

SCI_DISABLE_TK

Tk (Tclではなく) 機能を無効にします.

SCI_JAVA_ENABLE_HEADLESS

ヘッドレスJava仮想マシン (すなわち,GUI機能なし).

Java 仮想マシンオプション

The options described here-below are useless and are cancelled if the option -nwni is used.

Scilab 5.0以降, グラフィカルユーザインターフェイス (GUI) および ドキュメントの構築は,Java機能に基づいています. いくつかのケースでは, JVM (Java仮想マシン)オプションを編集することが重要となります.

これらのオプションは, SCI/etc/jvm_options.xmlファイルで利用可能です. デフォルトで, 以下の3つのオプションが 設定ファイルで容易にアクセス可能です:

-XmxXXXm

このオプションは,Java仮想マシンで利用可能なメモリ量を設定します. デフォルトで, 256M が確保されます. この値を変更した場合, その値がシステムで利用可能なメモリを 超えないことを確認してください.

この値は設定メニュー内で変更可能です.

-Djava.compiler=JIT

このオプションを引数JITを付けて指定すると, Java Just In Time compilerが有効になります. このオプションはデフォルトで有効となります. NONEによりJITは無効となり, 著しく性能が低下します.

-verbose:jni / -Xcheck:jni

これらのオプションは,JNIコールとその出力をより詳細に確認します. デバッグ時にはこれらのオプションを利用可能ですが, 性能を低下させるためデフォルトでは無効となっています.

より多くのオプションが利用可能です. これにより性能を改善したり,ルックアンドフィールを変更したり, メモリ管理を変更したりといったことが可能です. 参照: http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html

# Let's start Scilab in profiling mode without attaching a gdb once a SIGSEGV is met.
# We are under Bash shell
export SCILAB_VALGRIND_OPT="--db-attach=no --log-file=myfile.txt"
scilab -profiling
# Let's start Scilab in debug mode without stopping after each SIGSEGV
# First, we write a small command file
echo "handle SIGSEGV nostop" > debug.txt
# Now set the custom option
# We are under Bash shell
export SCILAB_GDB_OPT="--command=debug.txt"
# Start Scilab in debug mode
scilab -debug 

# Under GNU/Linux, Mac OS X or Unix:
$ echo "disp(%pi)" | scilab-cli
or
$ echo "disp(%pi)" | scilab -nwni
# Only open the Scilab help window:
$ scilab-adv-cli -e "help()"
or
$ scilab -nw -e "help()"
# Scilab can be used for scripting aspects:
echo "if 1<>2 then exit(99) end"|scilab-cli
echo $? 

参照

  • startup — スタートアップファイル
  • sciargs — scilab コマンドライン引数
  • getpid — ScilabプロセスIDを取得
  • getenv — 環境変数の値を取得
  • getversion — Scilabおよびモジュールのバージョン情報を取得
  • getscilabmode — Scilabモードを取得
  • consolebox — shows or hides the MS Windows terminal running the Scilab session
  • exit — カレントのScilab セッションを終了する
  • preferences — Scilab設定ウィンドウを開く
  • TeXmacs

履歴

バージョン記述
5.2.0 Piping is enabled. Option -l lang added
5.4.0 -noatomsautoload が追加されました. The Java Heap memory can be set through the preferences.
5.4.1 scinotes と xcos 個別スクリプトが導入されました. SEP #87参照.
6.0.0
  • User options:
    • Added: --help, -quit
    • Removed: -mem
  • Developer options added:
    • --parse-trace, --AST-trace, --pretty-print
    • --AST-timed, --timed
    • --no-exec, --exec-verbose, --timeout delay, --context-dump.
6.0.1 -scihome option added.
Report an issue
<< quit Scilab startup >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Mar 07 09:28:39 CET 2023