savematfile — write a Matlab MAT-file (binary or ASCII)
savematfile('filename') savematfile('filename', 'var1', 'var2', ...) savematfile('filename', '-struct', 's') savematfile('filename', '-struct', 's', 'f1', 'f2', ...) savematfile(..., '-v4') savematfile(..., '-v6') savematfile(..., '-v7') savematfile(..., '-v7.3') savematfile filename var1 var2 ...
character string containing the path of the file (needed)
data format to use
binary MAT-file (default)
8-bit ASCII format
16-bit ASCII format
delimits with tabs
16-digit ASCII format, tab delimited
A format that MATLAB Version 4 can open
A format that MATLAB Version 6 and earlier can open
A format that MATLAB Version 7 and earlier can open (default)
A format that MATLAB Version 7.3 and earlier can open
character strings containing the name of the variables to load (only for binary files)
saves all fields of the scalar structure s as individual variables within the file filename.
saves as individual variables only those structure fields specified (s.f1, s.f2, ...).
saves variables in a Matlab MAT-file from Scilab. The Scilab data types are converted into the Matlab equivalents.
A = rand(10,10); B = sprand(100,100,0.1); savematfile('test_matfile.mat','A','B','-v6'); clear; loadmatfile('test_matfile.mat'); disp(A) disp(B)
This function has been developped following the "MAT-File Format"
description:
Mat-File Format