% _________________________________________________________________________
% иииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииии
% PREDICTION OF ACUTE HYPOTENSIVE EPISODES USING NEURAL NETWORK MULTIMODELS
% _________________________________________________________________________
% иииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииии
%        Copyright (C) 2009 
%          : Jorge Henriques ...  <jh@dei.uc.pt>, 
%          : Teresa Rocha    ...  <teresa@sun.isec.pt>
%        This software is released under the terms of the GNU 
%        General Public License (http://www.gnu.org/copyleft/gpl.html)
% иииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииии
% mmResampling.m
%__________________________________________________________________________
% иииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииии
%  Resampling a signal (mean value)
%      > X    - input signal
%      > TIME - resampling time
%__________________________________________________________________________
% иииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииии


function yout=mmResampling( X, TIME)

first=1;
last =TIME;
Y=[];
while last<=length(X)
    yMinute=X(first:last);
    mY=mean(yMinute);
    Y=[Y;mY];
    first=first+TIME;
    last = last+TIME;
end
yout=Y(:);
