Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.0 - Português

Change language to:
English - Français - 日本語 - Русский

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

Ajuda do Scilab >> Scilab > scilex | scilab

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>


-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().


C:\Users\Me> scilex -nb -args "Hello \"%USERNAME%\"" 1.2345 \"%cd%\"
// Inside the opened session:
a = sciargs()
i = find(a=="-args")
"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  =

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

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

--> "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,

     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.

A file with .xcos extension will be opened by Xcos.


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 arquivo scilab.start.


"no banner" : Se esta opção está presente, então o cartão de boas-vindas não é impresso.


"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ário SCIHOME/.scilab, SCIHOME/scilab.ini não são executados.


Se esta opção estiver presente, os arquivos de inicialização do usuário SCIHOME/.scilab, SCIHOME/scilab.ini não são executados.


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,...).


Esta opção é reservada para TexMacs.


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.


Inicia o Scilab no debugger gdb.

The variable SCILAB_GDB_OPT may be set to add custom options to gdb.


Start Scilab under kdbg.


Start Scilab under valgrind.

The variable SCILAB_VALGRIND_OPT may be set to add custom options to valgrind (and override the existing valgrind options).


Start Scilab under callgrind.

The variable SCILAB_VALGRIND_OPT may be set to add custom options to callgrind (and override the existing callgrind options).


Start Scilab with the Electric Fence.

Environment variables


If this variable is present, Scilab startup script will show a startup debug information. Mainly used for bug report and debugging purposes.


Specify which Java to use. For example, JAVA_HOME=/usr/lib/jvm/java-7-openjdk/ scilab will start Scilab with Java 7.


Disable Tk (but not Tcl) features.


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:


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.


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:


# 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
$ echo "disp(%pi)"|scilab -nwni

# Only open the Scilab help window:
$ scilab-adv-cli -e "help()"
$ 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


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 >>

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 Feb 14 15:09:40 CET 2017