12.07.2015 Views

Learning Guide Learning Guide

Learning Guide Learning Guide

Learning Guide Learning Guide

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

24 • Chapter 2: Mathematics with Maple: the BasicsOperations on Sets and ListsThe member command verifies membership in sets and lists.> participants := [Kate, Tom, Steve];participants := [Kate, Tom, Steve]> member(Tom, participants);true> data_set := {5, 6, 3, 7};data_set := {3, 5, 6, 7}> member(2, data_set);falseTo choose items from lists, use the subscript notation, [n], where nidentifies the position of the desired element in the list.> participants[2];TomMaple recognizes empty sets and lists, that is, lists or sets that haveno elements.> empty_set := {};empty_set := {}> empty_list := [];empty_list := []You can create a new set from other sets by using, for example, theunion command. Delete items from sets by using the minus command.> old_set := {2, 3, 4} union {};

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!