Skip to content

Commit

Permalink
Small update.
Browse files Browse the repository at this point in the history
Shortened text "average".
  • Loading branch information
robdahn committed Jun 5, 2024
1 parent ffd7cf4 commit b69ebc3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cat_io_xml2csv.m
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,13 @@
else
% try to use spm_str_manip to extract similar starts/endings
try
[avg{1,ci},C] = spm_str_manip( tab(existxml>0,ci) ,'C');
if all(cellfun('isempty',C.m)); avg{1,ci}(strfind(avg{1,ci},'{,'):end) = []; end
txt = unique( tab(existxml>0,ci) );
if numel(txt) > 1
[avg{1,ci},C] = spm_str_manip( avg{1,ci} ,'C');
if all(cellfun('isempty',C.m)); avg{1,ci}(strfind(avg{1,ci},'{,'):end) = []; end
else
avg{1,ci} = char(txt);
end
catch
avg{1,ci} = '';
end
Expand Down

0 comments on commit b69ebc3

Please sign in to comment.