- Ajuda Scilab
- Interface Java
- Javasci v1 (deprecated)
- javasci.SciBoolean (deprecated)
- javasci.SciBooleanArray (deprecated)
- javasci.SciComplex (deprecated)
- javasci.SciComplexArray (deprecated)
- javasci.SciDouble (deprecated)
- javasci.SciDoubleArray (deprecated)
- javasci.SciInteger (deprecated)
- javasci.SciIntegerArray (deprecated)
- javasci.SciString (deprecated)
- javasci.SciStringArray (deprecated)
- javasci.Scilab (deprecated)
- Compile and run with javasci v1
- javasci FAQ
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
However, this page did not exist in the previous stable version.
javasci.Scilab (deprecated)
This class provides the basic methods to execute Scilab code and scripts. Deprecated: Please use Javasci v2
Description
This class is static. Since the Scilab environnement is persistant, all variables will remain accessible with the Java application.
Method Summary :
public static void Events()
- Execute a Scilab eventpublic static boolean HaveAGraph()
-Check if there is any scilab graphic window open (return True if it is the case).public static boolean Exec(String job)
- Execute a job in scilab. return true if there is no error.Note that the given expression must be consistent by itself. Then, a serie of
Exec
defining a function will not work. Please consider calling it with a single string instruction or using a temporary file with the methodExecuteScilabScript
.For example:
Scilab.Exec("function foo(); disp('bar'); endfunction");
will work whenScilab.Exec("function foo();"); Scilab.Exec("disp('bar');"); Scilab.Exec("endfunction;");
will not work since each statement being processed independentlypublic static native boolean ExistVar(String VarName)
- Detect if VarName exists in Scilab. return true if Varname exist.public static native int TypeVar(String VarName)
- Return Scilab type of VarName. See typepublic static native int GetLastErrorCode()
- Return last Error code. See lasterrorpublic static boolean ExecuteScilabScript(String scilabscriptfilename)
- Execute a scilab script (.sce) return true if there is no error.public static native boolean Finish()
- Terminate scilab (call scilab.quit , close a scilab object)
Examples
// A Scilab / Java example // Filename: ScilabExample.java import javasci.Scilab; public class ScilabExample { public static void main(String []args){ String myVar="myVariable"; Scilab.Exec(myVar+"=(%pi^4)/90;disp(myVariable);"); // Simple display if (Scilab.ExistVar(myVar)) { System.out.println("Variable "+myVar+" exists. Type: "+Scilab.TypeVar(myVar)); } if (!Scilab.Exec("disp(plop);")) { // Error System.err.println("Last error: "+Scilab.GetLastErrorCode()); // Error } Scilab.Finish(); } }
See Also
- Browse the documentation of Javasci v2.
- Compile and run with Javasci v1 — How to compile a Java application using Javasci v1. Deprecated: Please use Javasci v2
- SciDouble — Class to use double object with scilab. Deprecated: Please use Javasci v2
- SciDoubleArray — Class to use real matrix in Scilab. Deprecated: Please use Javasci v2
- SciString — Map a Java String into a Scilab string. Deprecated: Please use Javasci v2
- SciStringArray — Classe to use String matrix in Scilab. Deprecated: Please use Javasci v2
- type — tipo de variável
- lasterror — retorna a última mensagem de erro registrada
Authors
A.C
<< javasci.SciStringArray (deprecated) | Javasci v1 (deprecated) | Compile and run with javasci v1 >> |