Skip to content

Commit

Permalink
Changed default behavior for zero variance rows or columns
Browse files Browse the repository at this point in the history
  • Loading branch information
mnarayan committed Jul 24, 2017
1 parent 9e20cc3 commit 202020f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion +standardize/standardize_cols.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,15 @@

mu = mean(X);
sig = std(X,1);
assert(any(sig<1e-5)==0,'Check data matrix for near constant or 0 rows or colums');

try
assert(any(sig<1e-5)==0,...
'Check data matrix for near constant or 0 rows or colums' ...
);
catch me
disp(me);
sig(sig<1e-5) = 1.0;
end

switch method

Expand Down

0 comments on commit 202020f

Please sign in to comment.