12.07.2015 Views

Learning Guide Learning Guide

Learning Guide Learning Guide

Learning Guide Learning Guide

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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2.5 Basic Types of Maple Objects • 23The properties of sets make them a particularly useful concept inMaple, just as they are in mathematics. Maple provides many operationson sets, including the basic operations of intersection and union usingthe notation intersect and union.> {a,b,c} union {c,d,e};{a, b, c, d, e}> {1,2,3,a,b,c} intersect {0,1,y,a};{1, a}The nops command counts the number of elements in a set or list.> nops(%);2For more details on the nops command, see section 2.6.A common and very useful command, often used on sets, is map. Mappingapplies a function simultaneously to all the elements of any structure.> numbers := {0, Pi/3, Pi/2, Pi};numbers := {0, π, 1 3 π, 1 2 π}> map(g, numbers);{g(0), g(π), g( 1 3 π), g(1 2 π)}> map(sin, numbers);{0, 1, 1 2√3}Further examples demonstrating the use of map appear in sections 2.6and 5.3.

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

Saved successfully!

Ooh no, something went wrong!