Skip to content

Commit

Permalink
corrected dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Daehne committed Feb 18, 2014
1 parent 3b38487 commit f11d229
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
8 changes: 4 additions & 4 deletions fileio/file_readNIRx.m
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@

% Convert numeric clab to cell array of strings
if isnumeric(opt.Source)
opt.Source = apply_cellwise(num2cell(opt.Source),'num2str');
opt.Source = cellfun(@num2str, num2cell(opt.Source));
end
if isnumeric(opt.Detector)
opt.Detector = apply_cellwise(num2cell(opt.Detector),'num2str');
opt.Detector = cellfun(@num2str, num2cell(opt.Detector));
end

%% *** Process multiple files ***
Expand All @@ -191,7 +191,7 @@
if isempty(dd)
error('no files matching %s found', file);
end
file = apply_cellwise({dd.name}, inline('x(1:end-4)','x'));
file = cellfun(@(x)(x(1:end-4)), {dd.name}, 'UniformOutput',0);
file = strcat(fp,filesep,file);
end

Expand All @@ -201,7 +201,7 @@
hdr = file_readNIRxHeader(file);
T= [];
fprintf('concatenating files in the following order:\n');
fprintf('%s\n', vec2str(file));
fprintf('%s\n', str_vec2str(file));

for f = file
[cnt, mrk,dum,mnt]= file_readNIRx(f{:}, varargin{:});
Expand Down
2 changes: 1 addition & 1 deletion fileio/file_writeBVmarkers.m
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
pos= round(mrk.time/1000*opt.Fs);
if opt.UseClassLabels,
[dmy, toe]= max(mrk.y);
desc= cprintf('S%3d', toe);
desc= str_cprintf('S%3d', toe);
else
if iscell(mrk.event.desc),
desc= mrk.event.desc;
Expand Down
15 changes: 7 additions & 8 deletions fileio/private/file_loadBV.m
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@

if ~isempty(opt.LinearDerivation),
rm_clab= cell_flaten({opt.LinearDerivation.rm_clab});
rmidx= chanind(cnt.clab, rm_clab);
rmidx= util_chanind(cnt.clab, rm_clab);
cnt.clab(rmidx)= [];
cnt.clab= cat(2, cnt.clab, rm_clab);
end
Expand All @@ -174,7 +174,7 @@
if isempty(opt.CLab),
chInd= 1:nChans;
else
chInd= unique(chanind(cnt.clab, opt.CLab));
chInd= unique(util_chanind(cnt.clab, opt.CLab));
cnt.clab= {cnt.clab{chInd}};
end
uChans= length(chInd);
Expand All @@ -190,7 +190,6 @@
for cc= 1:uChans,
if cc==1 & nargout>1,
[cnt_sc, mrk]= file_loadBV(file, opt_tmp, 'clab',cnt.clab{cc});
mrk= mrk_resample(mrk, opt.Fs);
else
cnt_sc= file_loadBV(file, opt_tmp, 'clab',cnt.clab{cc});
end
Expand All @@ -207,15 +206,15 @@
end
cnt.x(:,cc)= cnt_sc.x;
if opt.Verbose,
print_progress(cc, uChans);
util_printProgress(cc, uChans);
end
end
if ~isempty(opt.LinearDerivation),
ld= opt.LinearDerivation;
for cc= 1:length(ld),
ci= chanind(cnt.clab, ld(cc).chan);
ci= util_chanind(cnt.clab, ld(cc).chan);
support= find(ld(cc).filter);
s2= chanind(cnt.clab, ld(cc).clab(support));
s2= util_chanind(cnt.clab, ld(cc).clab(support));
cnt.x(:,ci)= cnt.x(:,s2) * ld(cc).filter(support);
cnt.clab{ci}= ld(cc).new_clab;
end
Expand Down Expand Up @@ -378,9 +377,9 @@
if ~isempty(opt.LinearDerivation),
ld= opt.LinearDerivation;
for cc= 1:length(ld),
ci= chanind(cnt.clab, ld(cc).chan);
ci= util_chanind(cnt.clab, ld(cc).chan);
support= find(ld(cc).filter);
s2= chanind(cnt.clab, ld(cc).clab(support));
s2= util_chanind(cnt.clab, ld(cc).clab(support));
cnt.x(:,ci)= cnt.x(:,s2) * ld(cc).filter(support);
cnt.clab{ci}= ld(cc).new_clab;
end
Expand Down

0 comments on commit f11d229

Please sign in to comment.