Product Tips & Techniques

Tips and Tricks on how to get the most about Maple and MapleSim

There are a number of facilities in Maple which may be extended. Included amongst those are `type`, `print`, `evalf`, and `latex`. The help-page ?extension_mechanism claims that all the built-in functions allow for extension. It also mentions a few system Library routines such as `verify` (but does not mention `latex`).

There are some descriptions of varying completeness in a few...

The third example on the Plot Tickmarks and Gridlines help page - ?plot,tickmarks(tickmarks) - shows how to put labels at specific locations on a plot axis. But I couldn't find anything in the help pages about altering their font. However by changing the labels to names (enclose in left quotes, instead of double quotes) their font could be set using the axesfont option.

Perhaps something could be added to the example mentioned above. In the longer run though, all the help pages for plots need to be re-written: at present they resemble an untidy scrapbook.

J. Tarr
The command > contourplot(-1,x=0..1,y=0..1,contours=[0],filled=true); is supposed to fill the whole space with red (color for negative values) but it does nothing this is also problem once I need to define a piecewise function which is constant according to some condition, e.g. > f:=(x,y)->piecewise(x>1/2,x*y,-1); > contourplot(f(x,y),x=0..1,y=-1..1,contours=[0],filled=true); this should fill the entire half plane x>1/2 with red, it fills only part of the first quadrant...
The simpliest version of my problem is this: > f:=(x,y)->fsolve(sin(x+y+z)=1,z) > f(5,5); still ok but now: > plot(f(x,5),x=5..10); sais: "Error, (in fsolve) x is in the equation, and is not solved for" it seems as Maple would not first evaluate x:=5 and then solve f(x) :'(

I've made up a worksheet of the Top Ten Maple Errors, containing some of the common mistakes I often see newcomers to Maple commit (especially in the setting of my Introduction to Mathematical Computing class). I hope you will find it useful in trying to avoid those mistakes. Of course this is only a personal list, and not exhaustive. Please feel free to argue the merits of other items that should be included in the list. Here is the link: Download 4541_topten.mw

For the past decade Doug Meade, at the University of South Carolina, has created and maintained a two-page document with essential Maple commands. The first version was created for Maple V, Release 4, in January 1998. n update has been created for each version of Maple (except Maple 10) as it was released. The document has become pretty stable - hence the omission for Maple 10. Here are links to the complete set of documents he has created

Comments, corrections, and suggestions for improvement are welcomed. Please contact the author by e-mail.

Inspired by the blog post Find a point in every region defined by a system of linear equations, I have come up with the following method to find a point inside each bounded region. The assumptions are:
  • No two lines are parallel.
  • No three lines are coincident.
Due to numerical instability, it seems, using floats, the coefficients of the equations of the lines are taken to be integers (they could also have been taken to be fractions, of course). Then the method goes like follows:
I am coloring the xy plane, by using a procedure(x,y) to assign color. The procedure returns a number and color is assigned according to that number. It works fine but I really want some of the points to be colored BLACK. What numerical value do I use for BLACK? WHITE?

I have written a module based Maple expressions to LaTeX converter which can handle the following nested (as given by ToInert) inert types:

_Inert_RATIONAL, _Inert_COMPLEX, _Inert_NAME, _Inert_SUM, _Inert_PROD, _Inert_POWER, _Inert_SET, _Inert_LIST, _Inert_FUNCTION, _Inert_MATRIX, _Inert_VECTOR_COLUMN, _Inert_VECTOR_ROW, _Inert_TABLEREF.

As a somewhat cruel test example consider

expr := Matrix(2,2,(i,j) ->
	-(-x)^(-i/2+c)*sin(x)^(-j)*(a+I*b)^((i-j)/2)
	+f({-i,j})/g([-i,j])
	+m[i,j]
);
newLatex:-Latex(expr);

which yields

The recipe is quite simple to understand looking at an example (and it is understood best by having paper and pencil to follow it): f:= x -> x^2 the parabola with its inverse g:= y -> sqrt(y). Say you want the integral of g over 0 ... 2, which (here) is the area between the graph and its horizontal axis. That is the same as the area of the rectangle minus the area between the graph of g and the vertical axis, where the rectangle has corners 0, 2 and g(0)= f^(-1)(0) and g(2)= f^(-1)(2). Now recall the geometric interpretation of the compositional inverse of a function: it is reflection at the diagonal.
I've done a proc to produce a list of compound Poisson random variables as below, but it's not fast enough. I suspect there are better ways to do the same. Comments and solutions welcome! with(Statistics): FFFF := proc (g) local i, x, y, S; for i to g do x[i] := floor(convert(Sample(RandomVariable(Poisson(1)), 1), `+`)); if 0
Does anyone know how to get the openmaple api to compile in the presence of the package com.webobjects .foundation?
Just a friendly reminder, Regards, Introduction to Maple 11 Tuesday, January 8, 2008 2:00 pm EST. Register here. In this one-hour demonstration and Q & A forum you will learn about Maple 11’s smart-document user interface, enhanced mathematical power, and increased connectivity to other tools; all of which will dramatically improve your mathematical and technical problem-solving capabilities. Introduction to Maple T.A. 3.0 Tuesday, January 15, 2008 2:00 pm EST. Register here. Focusing on ease of use, this release contains an enriched authoring environment, a brand-new Gradebook, and additional authentication and administration features.
Have you ever plotted a function in Maple and then found that the range you plotted it on wasn't really what you wanted? You can always re-execute the command, of course, but that means working out exactly what the range is for that interesting feature you want to investigate, and if you've made changes to the plot those will be lost. However Maple has the ability to zoom in on a plot interactively, without re-executing the command. The Axis Properties dialog lets you change the range numerically, but you can also do so using the mouse. Go to the plot toolbar and click on the Scale plot axes button (it looks like a red ball with an arrow). If you have an animation you will need to click on the word "plot" above the toolbar to switch from animation to plot toolbar. Now put the mouse in the middle of the plot and drag it. Dragging it down will zoom out, increasing the range; dragging it up will zoom in. The Translate plot axes button lets you 'pan' i.e. move the centre of the axis ranges without changing the range size.
This isn't specifically Maple-related; but mathematics-related; related to Linear Algebra and Modern Algebra. While reviewing Linear Algebra; I ran across the concept of "Similar Matrices"; which are defined as: if A,B are nxn matrices and there exists invertible nxn matrix P such that P^(-1)*A*P = B then A is similar to B The payoff was: if A, B are similar then they "have the same eigenvalues" (the characteristic equation is same for both A and B). (Here we are talking about the group of invertible nxn matrices, with operation matrix multiplication) --
First 44 45 46 47 48 49 50 Last Page 46 of 64