matlab- Matlab bindings and interface

Safe HaskellNone



Generic runtime library interface. This uses a Matlab library built along with HSMatlab to provide runtime access to general Matlab functionality throuh Foreign.Matlab.Runtime. Any builtin Matlab function can be called through this interface, but other M-file functions may not -- these need to be put into a library or used through Foreign.Matlab.Engine instead.



openMLGeneric :: [String] -> IO MLGeneric

Create a generic interface to the Matlab runtime. Only one is necessary in any given application.

closeMLGeneric :: MLGeneric -> IO ()

Close a MLGeneric interface no longer in use.



:: MLGeneric 
-> String

The Matlab code string to evaluate

-> Int

The number of arguments returned by the code

-> IO [MAnyArray] 

Eval Matlab code.

mlGenericFun :: MLGeneric -> String -> MFun

Call the named Matlab function using the specified interface.

mlGenericSetVar :: MLGeneric -> String -> MXArray a -> IO ()

Set the given variable to the value in the base scope

mlGenericGetVar :: MLGeneric -> String -> IO MAnyArray

Get the value of the given variable in the base scope

mlGenericCapture :: MLGeneric -> String -> Int -> IO (String, [MAnyArray])

Evaluate Matlab code and capture the generated output (see mlGenericEval)