MaplePrimes Posts

MaplePrimes Posts are for sharing your experiences, techniques and opinions about Maple, MapleSim and related products, as well as general interests in math and computing.

Latest Post
  • Latest Posts Feed
  • The greatest benefits from bringing Maple into the classroom are realized when the static pedagogy of a printed textbook is enlivened by the interplay of symbolic, graphic, and numeric calculations made possible by technology.  It is not enough merely to compute or check answers with Maple.  To stop after noting that indeed, Maple can compute the correct answer is not a pedagogical breakthrough.

    ...

    It has been a while since my last post, mostly because of a combination of getting Maple 14 ready to ship and a lack of meaty topics to write about. I am trying to get back into the habit of posting more regularly. You can help me achieve my goal by posting questions about parallel programming. I'll do my best to answer. However for now, I'll give a brief overview of the new parallel programming features in Maple 14.

    A new function has been added to the Task Programming Model. The Threads:-Task:-Return function allows a parallel algorithm implemented on top of the Task Programming Model to perform an early bail out. Lets imagine that you have implemented a parallel search. You are looking for a particular element in a large set of data. Using the Task Programming Model, you've created a bunch of tasks, each searching a particular subset of the data. However one of the first tasks to execute finds the element you are looking for. In Maple 13, there was no built in way of telling the other tasks that the result have been found and they they should not execute. In Maple 14, the Return function allows one task to specify a return value (which will be returned from Threads:-Task:-Start) and signal the other tasks that the algorithm is complete and that additional tasks should not be executed. Tasks that are already running will still run to completion, but tasks that have not started executing will not be started.

    You may have noticed that there is a race condition with Return. What happens if two tasks both call Return in parallel? Only one of the values will become the value that is passed to Threads:-Task:-Start. I suppose I could say the "first" value is the one that is used, but really, what does that mean? If you call Return, then the value passed to Return should be an acceptable result for the algorithm.  If you call Return more than once, any of those values should be valid, thus it shouldn't matter which one becomes the return value.  That said, the Return function does give some feedback. In the task that succeeds in having its value accepted, Return will return true. In all other tasks that call Return, it will return false. This allows the code to know if a particular result was or was not accepted.

    Maple 14 also adds the Task Programming Model to the C External Calling API. This means that you can write your algorithms in C and make use of the Task Programming Model. The C API is similar to the Maple API, with a few differences. In particular, you need to create each child task individually, instead of as a single call to Continue, as you would in Maple. As well, because it is C code, you need to worry about a few details like memory management that are handled automatically in Maple.  Using External Call is fairly advanced, so I won't go into too much detail here.  If you'd like to see more details of using the Task Programming Model in External Calling, I can write a seperated post dedicated to that.

    As with every release of Maple, we spent some time trying to make our existing functionality faster and more stable. For parallel programming, we reduced the overhead of using the Task Programming Model, as well as reducing the locking in the kernel (which should help improve parallelism). Of course many bugs have been fixed, which should make parallel programming more reliable in Maple 14.

    Since the FIFA World Cup final is approaching quickly, I have created this animated Netherlands flag.  It is for my Dutch acquaintances to cheer for their favourite team during game.

    with(plots):
    p := [ seq(
    plot( [ seq((1/4)*sin(x+`if`(j > i, 1, 0))+1+2*i, i = 0 .. 3) ],
    x = 0 .. 2*Pi, y = 0 .. 8,
    color = [white, blue, white, red], filled = true, axes = none),
    j = [0, 1, 2, 3, 4, 3, 2, 1])

    Some images have reverted to some sort of equation form layout.  As an example look here http://www.mapleprimes.com/questions/87786-Smoothing-Data-Points-

    What has happened?

    Just for fun, I'm reviving the Maple soccer ball in anticipation of the FIFA final. You can make a simple animation by adding the option viewpoint=[circleleft] to the display command.

    with(plots):
    geom3d[TruncatedIcosahedron](p);
    V := evalf(geom3d[faces](p));
    display(seq(polygonplot3d(V[i], color = `if`(nops(V[i]) = 5, black, white)), i = 1 .. 32), scaling = constrained);

    I suppose this topic has come across many peoples minds at one time or another and I've only taken this number for granted and with a grain of salt.  I have become curious as to what other Maple users would run the memory usage up to? 

    For myself I find on average usually running below 10Mb or so.  I suppose this is average, for me, but I haven't usually created large worksheets, I don't think I've ever let it run over 40Mb. ...

    Here is yet another finesse (new to me) in getting better performance for some floating-point computation involving the Statistics package.

    > restart:

    > X:=Statistics:-RandomVariable('Normal'(0,1)):

    st:=time():
    seq(Statistics:-Quantile(X,1/i,numeric),i=2..10000):
    time()-st;[%%][-1];
    6.786
    -3.719016485

    > restart:

    > X:=Statistics:-Distribution(Normal(0,1)):

    This post had a centered H2 header that appeared fine in the wysiwyg post editor during composition but is absent in the Preview or actual Post (in my firefox 3.6.6).

    It appeared in the source view, during composition in the editor, like this,

    <h2 style="text-align: center;">This my header.</h2>
    

    I tried it also in an earlier submission, with the same result. When I attempt to re-edit that comment, the header was then missing in the source view as well as the posted view.

    Could it be, that the submission step causes some html content to vanish?

    I enter through http://www.mapleprimes.com/recent/all, but what I see is not true:

    http://www.mapleprimes.com/questions/94758-Why-Is-Summand-Singular-Here
    is shown as having 1 reply, while it has 4 replies.

    And if I do not see anything new on topics which I 'follow' then I just leave the site.

    The Maple ?Compiler can compile a limited subset of Maple commands to native code. The result is substantially faster than running interpreted Maple code. This article shows how you can save a compiled procedure for reuse.

    When a Maple procedure is compiled, a shared object library (dynamic-linked library for Windows) is created on the file system, as a temporary file.  When the Maple...

    If you search for a phrase which matches (fully or partially) the title of a post A, then the search results will contain every other post which the search engine recorded while post A was listed in the right panel.

    In other words, the search engine recorder is picking up  the right panel (latest titles, per forum) displayed while viewing other unrelated pages. So lots of other pages get inappropriately connected to all the keywords or phrases in those latest titles.

    The Linear Algebra package seems only able to handle Vector and Matrix algebra when the dimensions are given specifically.

    It would be very helpful if the package were to be extended to cope with the situation where some or all of the dimentions were given symbollically. Of course, assume could be used to indicate when two dimensions were equal.

    Are there any plans in this direction for future releases of Maple?

     

     

    I had started to create a procedure for finding the centroid of a list of points.

    Centroid := proc (list)
    local a, centroid, x, y, i:
    a := nops(list):
    x := 0:
    yi := 0:
    for i from 1 to a do
    x := x+list[i, 1]:
    y := y+list[i, 2]:
    end do:
    print(`Centroid is at`,([xi, yi]/a)):
    end proc:

    But I thought there needs to be something simpler than that.  And here we are.

    Centroid2 := proc (list)
    local i:
    print(`Centroid is at`, add(i, i = list...

    Happy Dominion Day.  

    acer

    First 138 139 140 141 142 143 144 Last Page 140 of 308