Skip to content
Snippets Groups Projects
Commit 00f34f27 authored by leprob001's avatar leprob001
Browse files

Bugfix, nemo.profile.load did not recognize STARTUP_MESSAGE. Added nemo.profile.findByDatevec.

parent 5073316e
No related branches found
No related tags found
No related merge requests found
245
\ No newline at end of file
246
\ No newline at end of file
function [profile] = findByDatevec(pProfiles, pDatevec)
%FINDBYTIMESTAMP Finds the profile next to the timestamp
% To find it, the SECOND_ORDER_INFORMATION.best_guess_datevec is being
% used.
timeDifferences = cellfun(@differenceCalculation, pProfiles);
% get the index of the minimum
[~, minimum] = min(timeDifferences);
profile = pProfiles{minimum};
function d = differenceCalculation(x)
d = abs(etime( ...
x.SECOND_ORDER_INFORMATION.best_guess_datevec, ...
pDatevec ...
));
end
end
......@@ -105,6 +105,7 @@ fclose(file_id);
'BOTTOM_VALUES_DURING_DRIFT', ...
'PROFILE_HEADER', ...
'QUALITY_CONTROL_HEADER', ...
'STARTUP_MESSAGE', ...
'SECOND_ORDER_INFORMATION' ...
}
% get variable name and value
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment