Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. a = {{1, 2}, {2, 3}};
  2. b = {{1, 3}, {3, 3}, {4, 1}};
  3. function[x__] := x//Intersection
  4. function[a[[;;,1]], b[[;;,1]]]
  5.  
  6. a = {{1, 2}, {2, 3}};
  7. b = {{1, 3}, {3, 3}, {4, 1}};
  8. function[x__] := x[[;;,1]]//Intersection
  9. function[a, b]
  10. Part::pkspec1: The expression {{1,3},{3,3},{4,1}} cannot be used as a part specification.
  11. Part::pkspec1: The expression {{1,2},{2,3}} cannot be used as a part specification.
  12.  
  13. function[a]
  14. {1,2}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement