-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPDBpatient.m
More file actions
executable file
·37 lines (34 loc) · 1.1 KB
/
PDBpatient.m
File metadata and controls
executable file
·37 lines (34 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
classdef PDBpatient < handle
properties
id char
implantType char
reimplantOf PDBpatient
seizures PDBseizure
electrodes PDBelectrode
units PDBunit
multiunits PDBmultiunit
markers PDBevent
notes char
end
properties (SetAccess = private, Hidden = true)
end
methods
function obj = PDBpatient(identifier,varargin)
if nargin < 1 || isempty(identifier)
identifier = 'unknown';
end
obj.id = identifier;
allowable = fieldnames(obj);
if mod(length(varargin),2) ~= 0
error('Inputs must be in name, value pairs');
end
for v = 1:2:length(varargin)
if find(ismember(allowable,varargin{v}))
obj.(varargin{v}) = varargin{v+1};
else
disp([9 'Not assigning ''' varargin{v} ''': not a field in PDBpatient']);
end
end
end
end
end