-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheckFeatureDefinitioFormat.m
41 lines (31 loc) · 1.07 KB
/
checkFeatureDefinitioFormat.m
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
function [flag] = checkFeatureDefinitioFormat(FieldName)
%
% checkEKGfeatureformat: Check if a structure contains correct fields
% corresponding to a "features" file from EKG signal
% It checks for fieldnames such as: Name, Value, Info.
%
% Syntax
% This function is not called independently, but instead is called from
% Pattern Recognition/Clustering module
%
%
% Description
%
% Milind Malshe
% The function checks the fieldnames against a standard list of names.
% SAID Toolbox Component
StdFieldName = {'MatlabFeatureList';'MatlabFeatureList_functionNames';'MatlabFeatures_button';...
'FortranFeatures_button';'RwaveLead_popUp_Value';'downSamplingRate_popUp';'pointsNumericalDeriv_popUp';...
'stepSizeQRS_editBox';'baselineCorrection_button';'vectorCardio_button'};
num = size(StdFieldName,1);
flags = zeros(num,1);
for i=1:num,
flags(i) = any(strcmp(StdFieldName(i),FieldName));
end
if all(flags(1:num)),
flag = 1;
% elseif all(flags(1:12)),
% flag = 1;
else
flag = 0;
end