Contents Previous Next Subchapters

Reading MAT-Files
Syntax mfread(filevarName)
See Also mfvars

Description
Returns an nr by nc double-precision matrix containing the value of varName from the MAT-file file. The values of nr and nc are equal to the row and column dimensions of varName.

The file file must only contain numeric-valued matrices. In particular the mfread function does not support loading MAT-Files that contain sparse matrices, cell arrays or structures.

Example
If in MATLAB you enter the commands
     x = [ 1 2 3 ]
     save tst.mat
MATLAB will create the file tst.mat which contains one variable x. If you continue the example by entering
     mfread("tst.mat","x")
at the O-Matrix prompt, O-Matrix will respond
     [ 1 , 2 , 3 ]