11.07.2015 Views

Maple 9 Learning Guide - Maplesoft

Maple 9 Learning Guide - Maplesoft

Maple 9 Learning Guide - Maplesoft

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

210 • Chapter 6: Evaluation and SimplificationNote that ’a[i]’ is a[i] not a[4].> ’a[i]’;a iYou must use evaln to unassign a[i].> evaln( a[i] );a 4> a[i] := evaln( a[i] );a 4 := a 4Using Quoted Variables as Function ArgumentsSome <strong>Maple</strong> commands use names as a way to return information inaddition to the standard return value. The divide command assigns thequotient to the global name, q.> divide( x^2-1, x-1, ’q’ );true> q;x + 1Use a quoted name to ensure that you are not passing a variable withan assigned value into the procedure. You can avoid the need for quotesif you ensure that the name you use has no previously assigned value.> q := 2;q := 2> divide( x^2-y^2, x-y, q );Error, wrong number (or type) of parameters in functiondivide

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

Saved successfully!

Ooh no, something went wrong!