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.

22 • Chapter 2: Mathematics with Maple: the BasicsbUse the nops command to determine the number of elements in a list.> nops(letters);3Section 2.6 discusses this command, including its other uses, in moredetail.SetsMaple supports sets in the mathematical sense. Commas separate theobjects, as they do in a sequence or list, but the enclosing curly bracesidentify the object as a set.> data_set := {1, -1, 0, 10, 2};data_set := {−1, 0, 1, 2, 10}> unknowns := {x, y, z};unknowns := {x, y, z}Thus, a set is an expression sequence enclosed in curly braces.Maple does not preserve order or repetition in a set. That is, Maplesets have the same properties as sets do in mathematics. Thus, the followingthree sets are identical.> {a,b,c}, {c,b,a}, {a,a,b,c,a};{a, b, c}, {a, b, c}, {a, b, c}Remember that to Maple the integer 2 is distinct from the floatingpointapproximation 2.0. Thus, the following set has three elements, nottwo.> {1, 2, 2.0};{1, 2, 2.0}

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

Saved successfully!

Ooh no, something went wrong!