Create a script file and type the following code:
a = [7 23 14 15 9 12 8 24 35]
b = [ 2 5 7 8 14 16 25 35 27]
u = union(a, b)
i = intersect(a, b)
s = setdiff(a, b)
When you run the file, it produces the following result:
a = 7 23 14 15 9 12 8 24 35
b = 2 5 7 8 14 16 25 35 27
u = Columns 1 through 11
2 5 7 8 9 12 14 15 16 23 24
Columns 12 through 14
25 27 35
i = 7 8 14 35
s = 9 12 15 23 24
a = [7 23 14 15 9 12 8 24 35]
b = [ 2 5 7 8 14 16 25 35 27]
u = union(a, b)
i = intersect(a, b)
s = setdiff(a, b)
When you run the file, it produces the following result:
a = 7 23 14 15 9 12 8 24 35
b = 2 5 7 8 14 16 25 35 27
u = Columns 1 through 11
2 5 7 8 9 12 14 15 16 23 24
Columns 12 through 14
25 27 35
i = 7 8 14 35
s = 9 12 15 23 24
No comments:
Post a Comment