function [ECG_ind, BP_ind] = get_ECG_BP_index(descriptions)
M = length(descriptions);
empty_ind = [];
for m=1:M
    if isempty(descriptions{m})
        empty_ind = [empty_ind, m];
    end
end
descriptions(empty_ind)=[]; %remove empty description

ECG_ind = [];
BP_ind = [];

M = length(descriptions);
for m = 1:M
    description=descriptions{m};
    
    if ~isempty(strfind(description, 'off'))
        continue;
    elseif ~isempty(strfind(description, 'ECG'))
        ECG_ind(end+1) = m;
    elseif ~isempty(strfind(description, 'BP'))
        BP_ind(end+1) = m;
    elseif ~isempty(strfind(description, 'ART')) 
        BP_ind(end+1) = m;
    elseif ~isempty(strfind(description, 'CVP'))
        BP_ind(end+1) = m;
    elseif ~isempty(strfind(description, 'PA'))
        BP_ind(end+1) = m;
    elseif ~isempty(strfind(description, 'Pressure'))
        BP_ind(end+1) = m;
    elseif ~isempty(strfind(description, 'II'))
        ECG_ind(end+1) = m;
    elseif ~isempty(strfind(description, 'lead'))
        ECG_ind(end+1) = m;
    elseif ~isempty(strfind(description, 'Lead'))
        ECG_ind(end+1) = m;
    elseif ~isempty(strfind(description, 'P4'))
        BP_ind(end+1) = m;
    elseif ~isempty(strfind(description, 'UAP'))
        BP_ind(end+1) = m;
    end
end