Changeset 1013 for trunk/src/hdf5save.m


Ignore:
Timestamp:
Oct 4, 2017, 3:55:18 PM (7 years ago)
Author:
g7moreau
Message:
  • Remove property svn:executable
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/hdf5save.m

    • Property svn:executable deleted
    r947 r1013  
    1313function hdf5save(filename,varargin)
    1414
    15 % this is just a wrapper function that calls a recursive function that
    16 % will save recursively structs.
     15    % this is just a wrapper function that calls a recursive function that
     16    % will save recursively structs.
    1717
    18 nvars=size(varargin,2)/2;
     18    nvars=size(varargin,2)/2;
    1919
    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)
    2233end
    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)
    33 
Note: See TracChangeset for help on using the changeset viewer.