function [ flt_std ] = running_std( array, N )

% float_rms - This function computes a running std over N points of array.
%   Note:  N should be odd

ok = ~isnan(array);

smooth_array = array;

smooth_array(ok) = smooth(array(ok), N);

flt_std = array;

flt_std(ok) = smooth((array(ok) - smooth_array(ok)).^2, N);

flt_std(ok) = flt_std(ok).^0.5;

end

