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.

5.1 Mathematical Manipulations • 161same degree, it sorts those terms by lexicographic order (in other words,a comes before b and so forth).> sort( x+x^3 + w^5 + y^2 + z^4, [w,x,y,z] );w 5 + z 4 + x 3 + y 2 + x> sort( x^3*y + y^2*x^2, [x,y] );x 3 y + x 2 y 2> sort( x^3*y + y^2*x^2 + x^4, [x,y] );x 4 + x 3 y + x 2 y 2Note that the order of the variables in the list determines the orderingof the expression.> sort( x^3*y + y^2*x^2, [x,y] );x 3 y + x 2 y 2> sort( x^3*y + y^2*x^2, [y,x] );y 2 x 2 + y x 3You can also sort the entire expression by lexicographic ordering, usingthe plex option to the sort command.> sort( x + x^3 + w^5 + y^2 + z^4, [w,x,y,z], plex );w 5 + x 3 + x + y 2 + z 4Again, the order of the unknowns in the call to sort determines theordering.> sort( x + x^3 + w^5 + y^2 + z^4, [x,y,z,w], plex );x 3 + x + y 2 + z 4 + w 5The sort command can also sort lists. See section 5.3.

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

Saved successfully!

Ooh no, something went wrong!