Mercurial > repos > public > sbplib
comparison SolutionFile.m @ 136:8298734b1938
Updated noname.calculateSolution to use the opt struct.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 09 Feb 2016 13:27:38 +0100 |
parents | dd4db0c97a02 |
children |
comparison
equal
deleted
inserted
replaced
135:8979d81515ac | 136:8298734b1938 |
---|---|
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 |