function [alarm,risk]=hemoalarm(in,ll,ul) % This function calculate number of alarms for a hemodynamic input % ll is lower limit % ul is upper limit % if one limit is not avaiable, its argument should be '0' c=in; a=rmunreported(c); t=a(:,1); a1=a(find(a(:,1)<=1440),:); a2=a(find(a(:,1)>1440),:); risk=[0;0]; alarm=[0;0]; if ~isempty(a1) if ((ll~=0) && (ul~=0)) dd=find(a1(:,2)>ul); ddd=find(a1(:,2)ul); % ddd=find(a(:,2)ul); ddd=find(a2(:,2)ul); % ddd=find(a(:,2)