matlab- Matlab bindings and interface

Safe HaskellNone




Safe immutable intermediate (functional) Matlab data structures.

This provides an alternative representation of Matlab data structures which can be marshalled to and from MXArray. An instance of Show is provided which creates Matlab expressions.



data IMXData Source

The basic immutable (functional) representation of Matlab data structures, representing a generic MXArray

Interface with Foreign.Matlab.Array

imxData :: MXArray a -> IO IMXData Source

Create an immutable representation from an MXArray

iMXData :: IMXData -> IO MAnyArray Source

Create a new MXArray from a functional representation.

imxFun :: MFun -> IMXFun Source

iMXFun :: IMXFun -> MFun Source

Construction and access

imxSize :: IMXData -> MSize Source

Generic IMXData array size accessor

listIMX :: IMXArrayElem a => MSize -> [a] -> IMXData Source

Generic IMXData list constructor. Specified MSize may contain at most one -1 value, which will be inferred from the length of the list.

scalarIMX :: IMXArrayElem a => a -> IMXData Source

Generic IMXData scalar constructor

imxList :: IMXArrayElem a => IMXData -> Maybe [a] Source

Generic IMXData list accessor

imxScalar :: IMXArrayElem a => IMXData -> Maybe a Source

Generic IMXData scalar accessor

listIMXStruct :: [String] -> MSize -> [IMXData] -> IMXData Source

Create a sized struct array from a sequential list of consecutive field values ([i0f0,i0f1,...,i0fM,i1f0,i1f1,....,iNfM]).

imxStructList :: IMXData -> Maybe ([String], [IMXData]) Source

Access a struct as list of fields and list of consecutive field values