Changeset 1013 for trunk/src/hdf5save.m
- Timestamp:
- Oct 4, 2017, 3:55:18 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/hdf5save.m
- Property svn:executable deleted
r947 r1013 13 13 function hdf5save(filename,varargin) 14 14 15 % this is just a wrapper function that calls a recursive function that16 % will save recursively structs.15 % this is just a wrapper function that calls a recursive function that 16 % will save recursively structs. 17 17 18 nvars=size(varargin,2)/2;18 nvars=size(varargin,2)/2; 19 19 20 if nvars~=floor(nvars) ; 21 error('expecting a name for each variable') ; 20 if nvars~=floor(nvars); 21 error('expecting a name for each variable'); 22 end 23 24 % Assign variables to save in workspace so as to be able to get them back 25 % with recursive fonctions. 26 for i=[1:nvars] 27 str=varargin{2*i}; 28 var=evalin('caller',str); 29 assignin('base',str,var); 30 end 31 32 hdf5save_recursion(filename,'',1,varargin) 22 33 end 23 24 % Assign variables to save in workspace so as to be able to get them back25 % with recursive fonctions.26 for i=[1:nvars]27 str=varargin{2*i};28 var=evalin('caller',str);29 assignin('base',str,var);30 end31 32 hdf5save_recursion(filename,'',1,varargin)33
Note: See TracChangeset
for help on using the changeset viewer.