% _________________________________________________________________________ % иииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииии % PREDICTION OF ACUTE HYPOTENSIVE EPISODES USING NEURAL NETWORK MULTIMODELS % _________________________________________________________________________ % иииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииии % Copyright (C) 2009 % : Jorge Henriques ... , % : Teresa Rocha ... % This software is released under the terms of the GNU % General Public License (http://www.gnu.org/copyleft/gpl.html) % иииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииии % mmMissingValues.m %__________________________________________________________________________ % иииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииии % Deal with missing values % - Interpolation of missing values %__________________________________________________________________________ % иииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииии function yout=mmMissingValues( data) npoint=5; TOL =5; % two consecutive measurements shuld be less than TOL %------------------------------- for each signal y=data; %---------------------- i99=find(y<=-49.99); y(i99)=0.0; if length(i99)>0 if i99(end)>590 & i99(end)<595 %.. last values - sometime there are problems with missing values y(i99(end):end) = filtfilt( 0.2, [1 -0.8], y(i99(end):end) ); end end i200=find(y>=199); y(i200)=0.0; %---------------------- ydif=diff(y); for i=2:length(ydif) if (abs(ydif(i))> TOL); y(i)=y(i-1); end end %---------------------- yaux=y; N=length(y); segmento=[]; i=1; %................................. while i