File: Scilab.java

package info (click to toggle)
scilab 4.1.2-6
  • links: PTS, VCS
  • area: non-free
  • in suites: lenny
  • size: 113,992 kB
  • ctags: 65,732
  • sloc: ansic: 406,468; fortran: 242,412; xml: 223,812; tcl: 46,703; sh: 10,945; ml: 9,441; makefile: 4,697; cpp: 1,354; java: 926; csh: 260; yacc: 247; perl: 130; lex: 126; asm: 72; lisp: 30
file content (89 lines) | stat: -rw-r--r-- 2,520 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
package javasci ;
/********************************************************************************************************/
/* Allan CORNET */
/* INRIA 2005 */
/********************************************************************************************************/
public class Scilab
{
/********************************************************************************************************/
  private static native void Initialize();
  /**
  * Initialize Scilab interface
  */
  
  public static native void Events();  
  /**
  * do a Scilab event 
  * See SCI/examples/callsci/callsciJava/others/ExempleEvent.java 
  */
  
  public static native boolean HaveAGraph();
  /**
  * Detect if a Scilab graphic window is opened
  */

  public static native boolean Exec(String job);
  /**
  * Execute a command in Scilab
  */
  
  public static native boolean ExistVar(String VarName);
  /**
  * Detect if Variable name exists in Scilab 
  */
  
  public static native int TypeVar(String VarName);
  /**
  * Get Scilab type  of a variable 
  * -1 not exist 
  * 1 : real or complex constant matrix. 
  * 2 : polynomial matrix.
  * 4 : boolean matrix.
  * 5 : sparse matrix.
  * 6 : sparse boolean matrix.
  * 8 : matrix of integers stored on 1 2 or 4 bytes 
  * 9 : matrix of graphic handles 
  * 10 : matrix of character strings.
  * 11 : un-compiled function. 
  * 13 : compiled function.
  * 14 : function library.
  * 15 : list.
  * 16 : typed list (tlist)
  * 17 : mlist 
  * 128 : pointer 
  */
  
  public static native int GetLastErrorCode();
  /**
  * Get Last Error Code
  * 0 no error
  */
  
  public static boolean ExecuteScilabScript(String scriptfilename)
  /**
  * Execute a scilab script .sce
  */
  {
		return Exec("exec(''"+scriptfilename+"'');");
  }
  
  public static native boolean Finish();
  /**
  * When you finish to use Scilab Call scilab.quit, clean memory, ... 
  */

  /**
  * See SCI/examples/callsci/callsciJava/others 
  * and
  * SCI/examples/callsci/callsciJava/ihm
  * for some simple examples
  */
/********************************************************************************************************/
  static 
  {
    System.loadLibrary("javasci");
    Initialize();
  }
/********************************************************************************************************/
}
/********************************************************************************************************/