swh:1:snp:d91631a580497fff421f83ef3e706159a0d67602
Tip revision: ca0cbd288f03c7a29050b3d6698a96b45ccfa4b2 authored by Marko Laine on 15 August 2021, 17:59:37 UTC
cleanup
cleanup
Tip revision: ca0cbd2
stdnan.m
function y=stdnan(x)
%STDNAN std with NaNs removed column wise
% $Revision: 1.1 $ $Date: 2011/06/29 06:14:16 $
[m,n] = size(x);
if m==1
x = x';
m = n;
n = 1;
end
y = zeros(1,n);
for i=1:n
y(i) = std(x(not(isnan(x(:,i))),i));
end