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.

7.2 Writing Data to a File • 273When you read the file, Maple displays the results but not the commands.> read "ks.tst";n∑(2 β)!S := n → binomial(n, β) ( − β! β)2β β = 11024937361666644598071114328769317982974If you set the interface variable echo to 2, Maple inserts the commandsfrom the file into your worksheet.> interface( echo=2 );> read "ks.tst";> S := n -> sum( binomial(n, beta)> * ( (2*beta)!/2^beta - beta!*beta ), beta=1..n );n∑(2 β)!S := n → binomial(n, β) ( − β! β)2β β = 1> S( 19 );1024937361666644598071114328769317982974The read command can also read files in Maple’s internal format. Seesection 7.2.7.2 Writing Data to a FileAfter using Maple to perform a calculation, you may want to save theresult in a file. You can then process the result later, either with Mapleor with another program.Writing Columns of Numerical Data to a FileIf the result of a Maple calculation is a long list or a large array of numbers,you can convert it to a Matrix and write the numbers to a file in astructured manner. The ExportMatrix command writes columns of numericaldata to a file, allowing you to import the numbers into another

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

Saved successfully!

Ooh no, something went wrong!