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

Change language to:
English - Français - Português - Русский

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Scilabヘルプ >> Scilab > scilab

scilab

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

呼出し手順

scilab <Options>

説定

-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> scilex -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\scilex  -nw  -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"

-->

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:

     scilab-cli -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:\scilab-5.5.2\bin\scilex -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 (Scilab 5.2以降).

互換性維持のため,その他に lang の値は,フランス語として 'fr' および英語として 'en' を使用可能です. デフォルト値は,scilab.startファイルで指定されます.

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

Scilab を以下のようにコールすることも可能です:

 LANG=ja_JP scilab
 # これは以下と等価です
 scilab -l ja_JP
-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 5.2以降:

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

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

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

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

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

Scilab 5.2以降:

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

  • 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

このオプションは TeXMacs用に予約されています.

ATOMSモジュールをインストールしてください:

atomsInstall('texmacs')

-version

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

Additional options for Unix/Linux and Mac OS X

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

-debug

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

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

-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仮想マシン)オプションを編集することが重要となります.

これらのオプションは, jvm_options.xmlファイルで利用可能です.

5.0.X および 5.1.Xでは, このファイルは SCI/modules/jvm/etc/jvm_options.xmlに保存されています.

>= 5.2.0以降, このファイルは etc/jvm_options.xml にあります.

デフォルトで, 以下の3つのオプションが 設定ファイルで容易にアクセス可能です:

-XmxXXXm

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

Scilab 5.4.0以降, この値は設定メニュー内で変更可能です.

-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およびモジュールのバージョン情報を取得
  • consolebox — show or hide the OS window running Scilab (MS Windows)
  • exit — カレントのScilab セッションを終了する

履歴

VersionDescription
5.4.0 -noatomsautoload が追加されました.
5.4.1 scinotes と xcos 個別スクリプトが導入されました. SEP #87参照.
6.0.0 -quit option added. -mem option removed.
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:
Mon Feb 12 23:12:39 CET 2018