rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
vectorset_difference.m
1 function [S1_without_S2, i1] = vectorset_difference(S1,S2)
2 %function [S1_without_S2, i1] = vectorset_difference(S1,S2)
3 %
4 % function determining the set-theoretic difference 'S1\\S2' of the
5 % columns in S1 and S2. i1 is a set of indices, which represent the
6 % columns of S1, i.e. 'S1(:,i1) = S1_without_S2'
7 
8 % Bernard Haasdonk 5.6.2007
9 
10 % search list of correspondences
11 
12 [i,j] = find_corresp(S1,S2);
13 
14 i_mask = zeros(1,size(S1,2));
15 i_mask(i) = 1;
16 
17 i1 = find(i_mask==0);
18 S1_without_S2 = S1(:,i1);
19 
20 
21 
22 
23 
24 
25 % TO BE ADJUSTED TO NEW SYNTAX
26 %| \docupdate