Daniel@0: function r = cut_Y(r, valid_idx) Daniel@0: % disables the invalid parts of the ranking structure Y Daniel@0: Daniel@0: % get indices not mentioned Daniel@0: u = find(~valid_idx); Daniel@0: Daniel@0: % clear bad data Daniel@0: for i = 1 : numel(u) Daniel@0: Daniel@0: r{u(i), 1} = []; Daniel@0: r{u(i), 2} = []; Daniel@0: end Daniel@0: Daniel@0: % also clear weights if applicable Daniel@0: if size(r,2) == 3 Daniel@0: for i = 1 : numel(u) Daniel@0: r{u(i), 3} = 0; Daniel@0: end Daniel@0: end Daniel@0: end