.. highlightlang:: us .. index:: matlab_load .. _matlab_load: matlab_load =========== .. us.tag matlab_load NOTREADYENGLISH matlab New5100 Changed5102 Changed5503 :ref:`matlab_load` loads a MATLAB file (mat file) into a UniScript object. .. function:: obj = matlab_load(ssFileName) .. us.return **Return Value** *obj* is a UniScript object. If an error occurs, an error object is returned (see :ref:`error_create`). .. us.params **Parameters** .. uparam:: ssFileName *ssFileName* is the name of the MATLAB file. MATLAB files normally carry the file extension :file:`.mat`. .. us.example **Example** .. include:: ../include/test_matlab_load.ic .. us.comment **Comment** Sparse matrices can be converted to a valid matrix with the following function:: def FullMatrix(mSparse) { dims = mSparse.dims; ir = mSparse.ir; jc = mSparse.jc; p = mSparse.p; m = zeros(dims); for (i in 1:len(p)) { m[ir[i]; jc[i]] = p[i]; } return m; } .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - R2013.3 - Support of mxINT64_CLASS, mxUINT64_CLASS and mxFUNCTION_CLASS. * - 5.10.2 - Support for MAT-4 files and support for big-endian byte order. * - 5.10.0 - New .. seealso:: :ref:`overview-matlab-files`, :ref:`matlab_save`, :ref:`import-of-matlab-data-files` :sub:`id-1988090`