comparison SolutionFile.m @ 167:15baeb35f74e feature/grids

Merge in changes from default.
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 23 Feb 2016 13:25:43 +0100
parents 8298734b1938
children
comparison
equal deleted inserted replaced
166:7cb97c1988d9 167:15baeb35f74e
32 obj.keys = obj.matfile.keys; 32 obj.keys = obj.matfile.keys;
33 33
34 end 34 end
35 35
36 function stupidSave(obj) 36 function stupidSave(obj)
37 % Read file contents
37 matObj = matfile(obj.filename,'Writable',true); 38 matObj = matfile(obj.filename,'Writable',true);
38 39
39 keys = obj.matfile.keys; 40 keys = obj.matfile.keys;
40 entries = obj.matfile.entries; 41 entries = obj.matfile.entries;
41 42
43 % Delete the file
42 if exist(obj.filename,'file') 44 if exist(obj.filename,'file')
43 delete(obj.filename); 45 delete(obj.filename);
44 end 46 end
45 47
48 % Rewrite the file
46 matObj = matfile(obj.filename,'Writable',true); 49 matObj = matfile(obj.filename,'Writable',true);
47 matObj.keys = keys; 50 matObj.keys = keys;
48 matObj.entries = entries; 51 matObj.entries = entries;
49 end 52 end
50 53