Code covered by the BSD License  

Highlights from
ProcessNetwork Version 1.0 Software

image thumbnail

ProcessNetwork Version 1.0 Software

by

 

Functions for the delineation of Dynamical Process Networks using Information Theory

[avg]=getSkipMean(vector,NoDataCode)
function [avg]=getSkipMean(vector,NoDataCode)

[N,~]=size(vector);
%compute means without NoData values
SUM=0;
nVALS=0;
for i=1:N
    if vector(i) ~= NoDataCode
        SUM=SUM+vector(i);
        nVALS=nVALS+1;
    end
end
if nVALS > 0
    avg=SUM/nVALS;
else
    avg=NoDataCode;
end

Contact us