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