www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/EnableWriteAccesstoMATfileExample.m

    %% Enable Write Access to MAT-file  

%% 
% Enable write access to the MAT-file, |myFile.mat|, by setting |Writable|
% to |true| when you open the MAT-file. 
filename = 'myFile.mat';
m = matfile(filename,'Writable',true);  

%% 
% Alternatively, set |Properties.Writable| in a separate step after you
% open the MAT-file. 
m.Properties.Writable = true;