Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Import/fieldtrip/fileio/private/read_neuralynx_ncs.m
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
% detect the number of timestamps per block while avoiding influencce of gaps
d = double(TimeStamp(2:end)-TimeStamp(1:end-1));
maxJump = ceil(10^6./(Fs-1))*512;
gapCorrectedTimeStampPerSample = nanmean(d(d<maxJump))/512;
gapCorrectedTimeStampPerSample = mean(d(d<maxJump),'omitnan') / 512;

% read the timestamp from the first and last record
if (ispc), fclose(fid); end
Expand Down
2 changes: 1 addition & 1 deletion src/ext/VBA/stats&plots/nanzscore.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
end

% Compute X's mean and sd, and standardize it
mu = nanmean(x,dim);
mu = mean(x, dim, 'omitnan');
sigma = nanstd(x,flag,dim);
sigma0 = sigma;
sigma0(sigma0==0) = 1;
Expand Down
2 changes: 1 addition & 1 deletion src/helper/pspm_segment_mean.m
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
conditions{c}.data(:,s) = subj_seg{s}{c}.mean(1:min_size);
end
m = conditions{c}.data;
conditions{c}.mean = nanmean(m,2);
conditions{c}.mean = mean(m, 2, 'omitnan');
conditions{c}.std = nanstd(m,0,2);
conditions{c}.sem = conditions{c}.std/sqrt(n_subjects);
conditions{c}.name = subj_seg{s}{c}.name;
Expand Down
2 changes: 1 addition & 1 deletion src/pspm_load1.m
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@
else
for iCond = 1:numel(indata.(mdltype).condnames)
condindx = strcmpi(indata.(mdltype).condnames{iCond}, indata.(mdltype).trlnames);
data.stats(iCond, :) = nanmean(indata.(mdltype).stats(condindx, :), 1);
data.stats(iCond, :) = mean(indata.(mdltype).stats(condindx, :), 1, 'omitnan');
end
data.names = indata.(mdltype).names;
data.trlnames = indata.(mdltype).trlnames;
Expand Down
Loading