Modular:-Mod, and/or Modular:-Copy to convert. (type ?Modular to see Maple's help page).Īgain, we need to convert to the special representation this There is a framework for efficient computation with matrices Just as with modp1 for univariate polnomials, Is LinearSolve, which gives a finds a solution Includes basic arithmetic such as Multiply and Add,Īs well as matrix invariant computations such as DeterminantĪnd Rank. ![]() With(LinearAlgebra) to see a listing of them. In the LinearAlgebra package type ?LinearAlgebra or The functions for arithmetic on Matrices and Vectors are all You can get the dimensions with the Dimensions command. Row-major order that is, the first index selects the row,Īnd the second index selects the column within that row. Note that theĮntries of a Matrix by default are indexed in Of course, Matrices will need two indices. To access the entries of a Matrix or Vector, use the subscript ![]() Separating the entries of a column vector, and |Ī Matrix is just a row vector of column vectors, or aĬolumn vector of row vectors. # Tells whether n can be expressed as a sum of 2 positive k'th powers, Whether n can be expressed as the sum of 2 positive Here's a procedure that takes an integer n and a number k, and determines Of each of these is as follows (type e.g. Maple supports if/then/else and while/for loops. That gets executed, or the explicit value passed with a The value returned from your procedure will either be the last statement In your program you probably won't use global as often as local. These variable declarations should come first Maple session, every variable you use must be declared either as anĪrgument or a local or global variable (with the local and global Maple expressions (such as procedure definitions) into your program file,Īnd then read it into the interactive Maple session with read.Īlternatively, you can pass in your file on the command line withĪ statement such as maple -q end proc. VIM or Emacs might even recognize Maple syntax. You can use any text editor you like some good ones like Use the time() command to get the total CPU time used so far in theįor this course, we'll be asking you to write your Maple programs in "bytes used" messages with kernelopts(printbytes=false). When you're running big computations, you can prevent those pesky Such as LinearAlgebra, or use the withĬommand, as in with(LinearAlgebra), to lift those functions to the top To access these, you can use the long form of the command, Sometimes a group of functions is grouped into a package or ToĮvaluate an expression, substituting a specific value for one variable, To find anĪpproximation, use evalf (probably won't be used in this class). Rational, complex, and algebraic numbers are all supported. However, every expressionīy default, all the simplifications Maple does are exact and symbolic. Have no type, so they can refer to any expression (symbols, numbers, Similar to functional programming languages like Scheme or Lisp, variables They can also be assigned values with the := operator. Simplified to a certain point automatically further simplifications Each expression must beĮxplicitly terminated with a semicolon (using a colon Maple -h will give a list of all the command-line switches the only ![]() Undergrads, cpu102.cs.uwaterloo.ca for grads). To run command line Maple, just type maple from the prompt of any So we'll just be using the command line version It will also be difficult for you to use if you don't have a personalĬopy of Maple. Is (probably) more intuitive to use, but can also create complications. There are two ways to run Maple: with the pretty interface Make use of Maple's help pages (in the program and online), as wellĪs the course newsgroup, to answer any further questions you might To cover every aspect of Maple programming, so you are encouraged to Where each step is relatively simple so that we have a thorough understanding Note that we will probably not be concentrating on such usesįor this class, but rather writing more complicated programs in Maple, ![]() Used Maple in a calculus class to compute derivatives, integrals, and Need to use Maple effectively in this class. This quick overview should get you started with the tools you'll
0 Comments
Leave a Reply. |