Reputation: 5789
I try to save mdl in old fomart
save_system(fullfile(fullpath, myModel(k).name), fullfile(fullpath, myModel(k).name),'SaveAsVersion', 'R2011b');
I'm getting an error saying that the file I'm trying to save is not writable how could I make it writable ? I don't find a similar arg as for copyfile(...'f')
any idea ?
Thanks,
Upvotes: 1
Views: 834
Reputation: 36710
There is a function to modify file attributes:
fname=fullfile(fullpath, myModel(k).name);
fileattrib(fname,'+w');
You could also use java:
fname=fullfile(fullpath, myModel(k).name);
java.io.File(fname).setWritable(true)
Upvotes: 1