Product Tips & Techniques

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

I've been making some use of the Maple Cloud for a while now, and thought that I'd share some comments.

So far, it's been quite useful to me, and I like it. This surprised me a bit. I expected not to find it useful, and to dismiss it with an old-timer's "Bah, humbug... as useless as Maple+twitter!" But, to the contrary, I've found a use for it; a need that isn't otherwise...

A new edition of The Mathematics Survival Kit – Maple Edition is now available.  It contains 25 new topics, which were created in response to requests from readers of the first edition of the book. New materials range from basic operations such as factoring and fractions, to graph sketching, vectors, and integration.

The Math Survival Kit gives students the opportunity to review exactly the concept or technique they are stuck on, learn what they need to know,...

Let's compare the performance of two methods of computing the inverse of a large datatype=float[8] Matrix.


The two methods are that of calling `MatrixInverse`,...

If you want better performance then don't use 2D Math mode to enter procedures which call  `.` (dot).

The following timings are not the result of the order in which the cases are performed. The timings stay roughly the same if the blocks delimited by restarts are executed out of order.

Important new updates are now available for Maple T.A. 6.  These updates improve performance and stability in areas related to the gradebook, assignment editor, question repository, course module import, and Blackboard and MapleNet integration.

In addition to these improvements, Maplesoft has also released language packs for French and Traditional Chinese. These language packs are a result of the new translatable interface in Maple T.A. 6. If your institution requires...

 

This is the fourth and final part of a blog post, the first three parts of which can be found here: Generating Samples from Custom Probability Distributions (I)

This is the third post in a four-part series; the earlier posts are Generating...

This is the second post in a four-part series that started with this post: Generating...

Maple's Statistics package contains many predefined probability distributions; well-known ones such as the normal distribution and lesser-known ones such as the Gumbel distribution. For these distributions, we ship efficient algorithms that can quickly generate a large number of sample points. To generate a sample of size 106 of both of these distributions, and print the time it took to do this (in seconds), you can run the following:

with(Statistics):

Consider the following C code:

I recently noticed that the symbol font in my maplets was not appearing correctly when I ran them using Maple 13 or 14 on my Windows 7 laptop. Additional testing showed that while this was pretty standard on Windows 7, it happened on some, but not all, Windows XP systems.

By a stroke of fortune, my local inquiries about this problem suggested that I look at the Clear Type effect that can produce sharper results, particularly on newer LCD displays.

Before going into too many details, let's look at an example. Here's the code for a simple maplet:

restart:
with(Maplets[Elements]):with(Maplets[Tools]):
StartEngine();

alphabet := "abcdefghijklmnopqrstuvwxyz":

TestFont:=Maplet(
  Window[mainWin](title="Font Test", [
    [ "The two lines of text should show the alphabet in the Times font and then\n the Symbol font, but sometimes the Symbol font is not correctly rendered." ],
    [ "Times ",    Label( alphabet, font=Font("Times",18) ) ],
    [ "Symbol",    Label( alphabet, font=Font("Symbol",18) ) ],
    [ Button( "Done", Shutdown() ) ],
    [ "Version: ", Label( convert(interface(version),string) ) ]
  ]
  )
):
Maplets[Display]( TestFont );

Copy these lines to a Maple worksheet (or document) and execute them, or save them to a text file with file extension .maplet, then double click on the file. The maplet should display two copies of the alphabet, the first with Times Roman font, the second with Symbol font. (The version of Maple running the maplet is given at the very bottom of the maplet.)

If you are running Maple 12 or older, I expect you'll see two different versions of the alphabet, like this:

If you are running Maple 14, I expect the line that should be in Symbol font will be in a poor quality Latin font, like this:

I can't predict which outcome you will see if the maplet is run in Maple 13.

What controls this behavior is the "effects" setting for the appearance settings for your display. If you are using the Clear Type effect, you will not see the Symbol font.

This problem is appearing now because up until Windows 7, the ClearType effect was not the default.

Along with the change in the default effect, the way in which users control the effect changed with the introduction of Windows 7.

Prior to Windows 7, access the Properties popup by right-clicking on your desktop. Then select the Appearance tab and click on the Effects button. In the second dropdown menu you can choose either Standard or ClearType. To see the symbol font (in Maple 13 and later), make sure this is set to Standard.

In Windows 7, go to the start menu and search for cttune.exe. Start the ClearType Text Tuner application. In the first popup window, be sure the Turn on ClearType box is unchecked. (For full instructions, including screenshots, please see http://www.sevenforums.com/tutorials/337-cleartype-text-tuner.html .)

When this effect is toggled, the effect changes immediately.

I can't call this a bug, but it is something that I think should be included somewhere in Maple's documentation.

Thanks for listening, I hope this is of use to someone else

There are two pieces of extended functionality that I quite often want from the Maple Compiler. The first (task A) is to be able to link in and use an arbitrary function from some other external ("3rd party") shared library, within my Compile'd Maple procedure. The second (task B) is to directly call the compiled Maple procedure from within some computational routine in a 3rd party shared library (which I would then access using define_external). This post is about the first of those, task A.

A user recently asked how to find the set of indices corresponding to a given value of a two-dimensional Array.

There are several ways to handle this problem.  For  a single value, a simple scan through the Array suffices:

FindIndices1 := proc(A :: Array, val)
local i,j,irng,jrng;
    (irng,jrng) := rtable_dims(A);
    {seq(seq(`if`(A[i,j]=val, [i,j], NULL), i=irng), j=jrng)};
end proc:

With a multi-core machine, the ...

Jacques' post on the maple.vim project spurred this post.  Vim users cannot have all the fun.

About a year ago I wrote an Emacs front-end for the Maple debugger.  I've used it since---it is now my primary debugging tool for Maple code.  What it does is allow stepping through interpreted Maple code in an Emacs buffer.  That is, rather than being presented with a single line of...

There is a probem in the Optimization package's (nonlinear programming problem) NLPSolve routine which affects multivariate problems given in so-called Operator form. That is, when the objective and constraints are not provided as expressions. Below is a workaround for this.

Usually, an objective (or constraint) gets processed by Optimization using automatic differentiation tools ...

First 34 35 36 37 38 39 40 Last Page 36 of 66