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.

subs( {2=9}, evalm(pwrs) );2.5 Basic Types of Maple Objects • 29⎡⎣1 1⎤19 4 8 ⎦3 9 27Not only does this cause the substitution to occur in the components asexpected, but full evaluation also displays the array’s elements, just aswhen you use the print command.> evalm(pwrs);⎡⎣1 1⎤12 4 8 ⎦3 9 27TablesA table is an extension of the concept of the array data structure. Thedifference between an array and a table is that a table can have anythingfor indices, not just integers.> translate := table([one=un,two=deux,three=trois]);translate := table([three = trois, one = un, two = deux])> translate[two];deuxAlthough at first they may seem to have little advantage over arrays,table structures are very powerful. Tables enable you to work with naturalnotation for data structures. For example, you can display the physicalproperties of materials using a Maple table.> earth_data := table( [ mass=[5.976*10^24,kg],> radius=[6.378164*10^6,m],> circumference=[4.00752*10^7,m] ] );

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

Saved successfully!

Ooh no, something went wrong!