17 lines
430 B
Mathematica
17 lines
430 B
Mathematica
|
function[obj] = setLabelRelativeToLabel(objs, target, name, time)
|
||
|
|
||
|
%% define possible coding styles of markers
|
||
|
if (~ischar(name))
|
||
|
error('Pattern must be character array')
|
||
|
end
|
||
|
|
||
|
%% lookup label_pattern:
|
||
|
|
||
|
label_ind = find(~cellfun(@isempty,regexp(obj.label_patterns, target)));
|
||
|
if isempty(item)
|
||
|
error(sprintf('Target label is unknown: %s', target));
|
||
|
end
|
||
|
|
||
|
e.subjects.sessions.label_dependencies{label_ind} = {name time};
|
||
|
|
||
|
|