Product Tips & Techniques

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

Consider the following situation.  A thread acquires a mutex, then enters a critical section.  However when executing in the critical section, the thread access a memory location.  If that memory location is not in cache, the thread will wait for a few hundred cycles.  If accessing the memory location causes a page fault (the memory was swapped out to disk), the thread may need to wait a few million cycles.  However while this thread is waiting, it is still holding the mutex.  This means that other threads will not be able to enter the critical section, and may

A MaplePrimes member recently asked me how to sort two sets, using the permutation of one to sort the other.  For example, given the list

L1 := [3+I, I, 2, -1, 5, 4]:

sort it according to its magnitude and then permute the second list

L2 := [a, b, c, d, e, f]:

in the same manner.

The following interaction with Maple's Excel link came to my attention today.  I thought it had many interesting points that lead to insights about Excel and Maple that are worth sharing. 

So it appears that using subscripts in Maple is not a good idea. I ran into this problem for the first time yesterday, and is documented here: http://www.mapleprimes.com/forum/drivenharmonicoscillatoramplitudephaseangle#comment-32780 And now it seems I've run into it again. Or possibly I have made a mistake ;) This is part of an implementation of Newton-Cotes method of numerical integration: restart: NCcoef := proc(N::integer) # procedure returns the Newton-Cotes coefficients for an # appoximation with N+1 points local a,c,p,h,B,LH,RH,eq,seqeq,seqco: h := B/N:

It has been a while since my last post.  I'm sorry about that, but I have been busy trying to the fix bugs reported as part of the Maple Beta program.  I'm also running low of good parallel programming topics.  So, as always, if you have topics you'd like to hear about (or hear more about) feel free to ask.

Today I am going to post a brief note about a blog that I find quite interesting.

Cliff Click Jr's Blog: http://blogs.azulsystems.com/cliff/

I came across this issue on my course today, and found it somewhat surprising: restart:Digits:=7: foo:=1/2*sqrt(3): evalf(foo); 0.8660255 evalf[5](%); 0.86603 evalf[5](foo); 0.86605 I suppose this means that whatever algorithm Maple uses to compute the square root also works to the specified level of accuracy and the above is a result of accumulated rounding errors.

I came across the tutorial/manual here, which I found to be most excellent for a beginner in Maple, such as myself:

http://www.maths.ox.ac.uk/courses/2009/moderations/mathematics-maple/exploring-mathematics-maple/material

The page will also be updated with lecture notes and sample code

To judge results of functions coded in double precision against precise results (as they may be given by Maple) one has to respect decimal presentations on one side and IEEE on the other side.

For that one can use routines developed by Florent de Dinechin, which are worth to be better known.

Here is a Maple sheet showing how one can do it (looking at the complex valued power function using evalhf versus using MS VC2005 as an example).

There was some recent discussion about Maple's Standard GUI having two parsers. (See here, and its parent.)

I've been accumulating a list of some differences between the parsers of 2D Math and 1D Maple notation, for the same given pasted input.

In particular, I'm interested here in differences...

This blog will contain postings documenting some of my mathematical travels. In particular it will chronicle my experiences and problems in learning maple and the mathematics I am studying along the way.
Using Maple 12 I have the following behaviour, which I find odd:


1. 'evalb' is correct, 'is' turns out to be false (by example):

  eq:=1/2*I*(-z+ln(exp(z)))/Pi = -1/2*I*(z+ln(exp(-z)))/Pi;

  evalb(eq);
                                false
  is(eq);

I realized the other day that I had not mentioned the Threads:-Add, Threads:-Map, Threads:-Mul and Threads:-Seq functions.  These are parallel implementations of the standard Maple functions, add, map, mul and seq.  They expect the sam

On and off over the last few months I've been meaning to learn about computing a center manifold approximation and normal form of a dynamic system of three differential equations.

My main reading: Stephen Wiggins, Introduction to Applied Nonlinear Dynamical Systems and Chaos, Second Edition, Springer, 2003.

I want to apply the technique to a system I derived from an optimal control problem. As a first step, I decided to reproduce the steps for the following system, for which the solution has been published.

Below is the latest version of the code to draw iso-chrone lines and a salvo of arrows onto the phase diagram of a two-dimensional system of ordinary differential equations.

I have greatly benefited from inputs by Robert Israel (who wrote the first incarnation of the procedure), Joe Riel, and pagan. A big thankyou!

The procedure is sufficiently developed for my current purpose, so I don't plan to modify it much in the near future.

Tested on Maple 13/ Classic. The last plot combines the isochrones and the salvo.

what I learned today is that you cannot write 1e-i, where i is an unassigned variable (at least not like that):

First 35 36 37 38 39 40 41 Last Page 37 of 65