-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathgetmilinfo.m
More file actions
executable file
·51 lines (47 loc) · 1.1 KB
/
Copy pathgetmilinfo.m
File metadata and controls
executable file
·51 lines (47 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
%GETMILINFO Get MIL info from dataset
%
% VALUE = GETMILINFO(A,FIELD)
%
% INPUT
% A MIL dataset
% FIELD Info field name (default = 'combinerule')
%
% OUTPUT
% VALUE Some output
%
% DESCRIPTION
% Retrieve the MIL parameters, given by FIELD, from dataset A. Possible
% parameters are given in SETMILINFO.
%
% SEE ALSO
% SETMILINFO, RMMILINFO
% Copyright: D.M.J. Tax, D.M.J.Tax@prtools.org
% Faculty EWI, Delft University of Technology
% P.O. Box 5031, 2600 GA Delft, The Netherlands
function value = getmilinfo(a,field)
if nargin<2
field = 'combinerule';
end
ud = getuser(a);
if isempty(ud) | ~isfield(ud,'mil')
value = [];
return;
end
switch field % consistent with setmilinfo.m and rmmilinfo
case {'combrule' 'combinerule'}
if ~isfield(ud.mil,'combinerule')
warning('No MIL combine rule defined, using ''presence'.');
value = 'presence';
else
value = ud.mil.combinerule;
end
case {'useFileAsBag','usefileasbag'}
if ~isfield(ud.mil,'useFileAsBag')
value = '';
else
value = ud.mil.useFileAsBag;
end
otherwise
error('This field is not defined in a MIL dataset.');
end
return