Skip to content

Commit

Permalink
Bugfix: Displaying TF files with NaN values
Browse files Browse the repository at this point in the history
  • Loading branch information
ftadel committed Apr 29, 2020
1 parent 0e4712a commit 2cf94ce
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions toolbox/core/bst_memory.m
Expand Up @@ -1687,6 +1687,14 @@ function LoadResultsMatrix(iDS, iResult)
end
end

% ===== REMOVE NAN =====
% Replace NaN values with 0, and add them to the mask
iNan = find(isnan(TimefreqMat.TF));
if ~isempty(iNan)
disp(sprintf('BST> Error: There are %d abnormal NaN values in this file, check the computation process.', length(iNan)));
TimefreqMat.TF(iNan) = 0;
end

% ===== CREATE NEW TIMEFREQ ENTRY =====
% Create structure
Timefreq = db_template('LoadedTimefreq');
Expand Down

0 comments on commit 2cf94ce

Please sign in to comment.