iconEuler Reference

Scilab Interface

Interface for the SciLab program.

If you have Scilab for Windows installed, you can call commands in Scilab with this interface. Start the Scilab process with "slstart", and stop it with "slend" (or by exiting EMT).

A command is entered with the sl() function.

Needs to be loaded with "load scilab"

function slstart (scilab:string=none, check=false)
  Start the Scilab process
  The function searches the current version of Scilab in the program
  directory. Alternatively you can enter the path to "scilex.exe" as
  a parameter.
  Since Scilab is not signalling that it waits for input, we are
  relying on the format of the start string. This function needs to
  be fixed whenever the start string changes.
slend (Scilab Interface)
function slend ()
  Kill the Scilab process.
function slstrip (s: string vector)
  Strips the result of Scilab
  The global flags stripstart, stripend, stripans are used.
  stripstart : strip emtpy lines and optionally "ans  =".
  stripend : strip empty lines at the end.
function prefixline sl (s)
  Send a command to Scilab
  Scilab must be started with slstart() first.
  Returns a vector of strings containing the answer of Scilab.
  The string is stripped from empty lines at start and end,
  and the line "ans  =" by default.
  >sl sum(1:1000)/1000
slstart (Scilab Interface),
slend (Scilab Interface),
slstrip (Scilab Interface)
function slget (s:string)
  Try to interpret the result of Scilab.

Documentation Homepage