dynDate --> dates in load_mat_file_data routine. Fixed unitary test.

time-shift
Stéphane Adjemian (Charybdis) 2013-10-16 12:03:39 +02:00
parent d0220e8685
commit fb08f5c133
1 changed files with 8 additions and 4 deletions

View File

@ -36,10 +36,14 @@ function [freq,init,data,varlist,tex] = load_mat_file_data(file)
datafile = load(file); datafile = load(file);
if isfield(datafile,'INIT__') if isfield(datafile,'INIT__')
init = dynDate(datafile.INIT__); if isdate(datafile.INIT__)
datafile = rmfield(datafile, 'INIT__'); init = dates(datafile.INIT__);
datafile = rmfield(datafile, 'INIT__');
else
error('load_mat_file_data: INIT__ cannot be interpreted as a date.')
end
else else
init = dynDate(1); init = dates(1,1);
end end
if isfield(datafile,'FREQ__') if isfield(datafile,'FREQ__')
@ -100,7 +104,7 @@ end
%$ %$
%$ % Check the results. %$ % Check the results.
%$ t(2) = dyn_assert(freq,12); %$ t(2) = dyn_assert(freq,12);
%$ t(3) = dyn_assert(isa(init,'dynDate'),1); %$ t(3) = dyn_assert(isa(init,'dates'),1);
%$ t(4) = dyn_assert(init.freq,12); %$ t(4) = dyn_assert(init.freq,12);
%$ t(5) = dyn_assert(init.time,[1938 11]); %$ t(5) = dyn_assert(init.time,[1938 11]);
%$ t(6) = dyn_assert(varlist,{'hagop';'bedros'}); %$ t(6) = dyn_assert(varlist,{'hagop';'bedros'});