1
0
Fork 0
mirror of https://github.com/MillironX/beefblup.git synced 2024-11-14 03:23:09 +00:00
beefblup/MATLAB/uniquenan.m

10 lines
No EOL
212 B
Matlab

% uniquenan
% Serves the same purpose as UNIQUE, but ensures any NaN fields are not
% counted
function y = uniquenan(x)
y = unique(x);
if any(isnan(y))
y(isnan(y)) = [];
y(end + 1) = NaN;
end
end