Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
scilex | scilab
principal script para executar o Scilab e ferramentas de miscelânea
Sqeüência de Chamamento
# MS Windows | # Linux / Unix / Mac OS X wscilex <Options> | scilab <Options> wscilex -nw <Options> | scilab-adv-cli <Options> scilex <Options> | scilab-cli <Options>
Parâmetros
- -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 -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
Para uso apenas em sistemas Xwindow para ajustar um display de servidor X. O display padrão é unix:0.0
-display
pode ser abreviado por-d
- -e Instructions
No final de toda a sessão de inicialização, esta opção
Define o diretório de trabalho atual para o diretório shell do qual o Scilab foi lançado. Por favor veja o exemplo dado aqui-abaixo para a opção
-f
. Então,executa dado Scilab
Instructions
. Exemplo :scilab-cli -e "disp(\"Hello\"); a=%pi+%i; disp(exp(a)); exit;" -nb
As opções-e
e-f
são mutuamente exclusivas.- -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,
will do aD:\users\me\scilab\dev> C:\scilab-5.5.2\bin\scilex -f ..\test.sce
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.
A file with .xcos extension will be opened by 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 idioma
Se esta opção estiver presente, ela fica o idioma do usuário. Os possíveis valores para
idioma
são'fr'
para francês,'en'
para inglês e 'br' para português brasileiro. O idioma padrão é inglês. O valor padrão é fixado no arquivoscilab.start
.- -nb
"no banner" : Se esta opção está presente, então o cartão de boas-vindas não é impresso.
- -ns
"No Startup files" : Se esta opção está presente, o arquivo de inicialização
SCI/etc/scilab.start
e os arquivos de inicialização do usuárioSCIHOME/.scilab
,SCIHOME/scilab.ini
não são executados.- -nouserstartup
Se esta opção estiver presente, os arquivos de inicialização do usuário
SCIHOME/.scilab
,SCIHOME/scilab.ini
não são executados.- -nw
Se esta opção estiver presente, então o Scilab não é executado em uma janela específica.
- -nwni / -nogui
- This mode prevents loading the Java Virtual Machine. It starts faster and uses less memory.
Se esta opção estiver presente, então o Scilab não é executado em uma janela específica e não aceita interação do usuário (graphics, export, xcos, scinotes, help browser, Java module,...).
- --texmacs
Esta opção é reservada para TexMacs.
- -version
Esta opção imprime a versão do Scilab.
Additional options for Unix/Linux and Mac OS X
Advice: use theses options on a Scilab source tree.
- -debug
Inicia o Scilab no debugger gdb.
The variable
SCILAB_GDB_OPT
may be set to add custom options to gdb.- -debug-kdbg
Start Scilab under kdbg.
- -profiling
Start Scilab under valgrind.
The variable SCILAB_VALGRIND_OPT may be set to add custom options to valgrind (and override the existing valgrind options).
- -profiling-visu
Start Scilab under callgrind.
The variable SCILAB_VALGRIND_OPT may be set to add custom options to callgrind (and override the existing callgrind options).
- -electric-fence
Start Scilab with the Electric Fence.
Environment variables
- SCIVERBOSE
If this variable is present, Scilab startup script will show a startup debug information. Mainly used for bug report and debugging purposes.
- JAVA_HOME
Specify which Java to use. For example,
JAVA_HOME=/usr/lib/jvm/java-7-openjdk/ scilab
will start Scilab with Java 7.- SCI_DISABLE_TK
Disable Tk (but not Tcl) features.
- SCI_JAVA_ENABLE_HEADLESS
Enable Java Headless VM (i.e. without GUI features).
Java Virtual Machine options
The options described here-below are useless and are cancelled if the option -nwni is used. |
Starting from Scilab 5.0, the graphical user interface (GUI) and the build documentation are based on Java features. In some cases, it can be important to edit the JVM options (Java Virtual Machine).
These options are available in the jvm_options.xml file.
In version 5.0.X and 5.1.X, this file is stored as SCI/modules/jvm/etc/jvm_options.xml.
In version >= 5.2.0, the file is available in etc/jvm_options.xml.
By default, the three following options are easily accessible in the configuration file:
- -XmxXXXm
This option set the amount of memory available by the Java Virtual Machine. By default, 256M are allocated. If you change this value, check that the value does not exceed the memory available on the system.
Since Scilab 5.4.0, this value can be changed in the preferences menu.
- -Djava.compiler=JIT
This option with the argument JIT enables the Java Just In Time compiler. It is activated by default. NONE disables the JIT and decreases dramatically performances.
- -verbose:jni / -Xcheck:jni
These options enable more checks and output from the JNI calls. These options are useful in case of debugging and are disabled by default since they decreases performances.
Many more options are available. They can improve the performances, change look and feel, change memory managements... See: http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html.
Exemplos
# 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 $?
Ver também
- startup — arquivo de inicialização
- sciargs — scilab command line arguments
- getpid — Retorna o identificador do processo Scilab
- getenv — retorna o valor de uma variável de ambiente
- getversion — retorna o nome da versão do Scilab
- consolebox — show or hide the OS window running Scilab (MS Windows)
- exit — termina a sessão Scilab corrente
Histórico
Versão | Descrição |
5.4.0 | -noatomsautoload added. |
5.4.1 | scinotes and xcos individual scripts introduced. See SEP #87. |
6.0.0 | -quit option added. -mem option removed. |
Report an issue | ||
<< quit | Scilab | startup >> |