forked from TASBE/TASBEFlowAnalytics
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgeostd.m
More file actions
20 lines (19 loc) · 684 Bytes
/
geostd.m
File metadata and controls
20 lines (19 loc) · 684 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
% Copyright (C) 2010-2017, Raytheon BBN Technologies and contributors listed
% in the AUTHORS file in TASBE analytics package distribution's top directory.
%
% This file is part of the TASBE analytics package, and is distributed
% under the terms of the GNU General Public License, with a linking
% exception, as described in the file LICENSE in the TASBE analytics
% package distribution's top directory.
function s = geostd(data,weights)
if (isempty(data))
s = NaN;
else
if nargin < 2
s = 10.^std(log10(data));
else
valid = weights>0;
s = 10.^sqrt(var(log10(data(valid)),weights(valid)));
end
end
end