Contents Previous Next Subchapters

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

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.

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
at the O-Matrix prompt, O-Matrix will respond
     [ 1 , 2 , 3 ]