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
  • Russian MAC:
    1.000.000 visits during the period June 2010 to April 2011

    http://webmath.exponenta.ru/ege_11/d_04.html

     

    At one point mapleprimes was fun and enjoyable ... until you get thumbed down with no explanation, it's really a kick in the teeth to see such things.  Because I see the thumbs down is still operational as it was to be removed.

    This forum is not about some power trip and getting points thumbing people down or up and destroying the order of posts.  This is about sharing information and helping people get answers, if the answer is not good then let...

    Inside a procedure, local variables are evaluated only one level. Of what good is this, one might ask?

    Well, for one thing it allows you to do checks or manipulations of an unevaluated function call without having that function call be evaluated over again. I mean, for function calls to routines which don't happen to remember earlier results.

    This is a revision of an Answer

    Another feature added to Maple 15 partially in response to the MaplePrimes forums is the new/improved ?HTTP package.  It provides one-step commands for fetching data from the web: much simpler than using the ?Sockets package directly. In most cases, the command ?HTTP,Get is what you would use:

     (s, page, h) := HTTP:-Get("http://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors"):

    The above fetches the HTML source of a page from Wikipedia and stores it as a string 'page'. The other two outputs are 's', and integer HTTP status code and 'h' a table of the headers returned in the HTTP response from the server.  Compare this to the amount of code needed to fetch data in my Baby Names application for Maple 12, for example.

    There have been some recent posts about interpolating data.

    Attached below is a worksheet that shows some possibilities, with the functionality centering on the CurveFitting:-ArrayInterpolation command.

    This is quick summary of parts of a broader document which covers both 2-d and 3-d methods (for regular grids), where I've left out the higher-efficiency methods and instead roughed in some examples involving integration and differentiation.

    I've elected not to follow the 3-d Example from the ArrayInterpolation command's help-page, although using a pre-formed grid is a very fast approach to obtain just an interpolated 3-d plot. I also prefer to use the plots:-surfdata command rather than the plots:-matrixplot command, since the former let's one get the axes' tickmarks correct for the x- and y-data ranges.

    The scenario is that you have a grid of data points in two dimensions (x- and y, or P- and T-, or what have you).

    For each point (ie, for each 2-d pair of values) you have an associated value (or height in z, say). Hence you actually have data points in 3-d space.

    How you obtained the associated (z) values depends on your own particular data collection method, or your own program. How you got the data is irrelevant here. What matters is that you have the finite number of data values, and no other easy way to generate data values at more points (let alone data for arbitrary new points). Below, we'll just create the data (once, at the start) for this example using an entirely made-up formula.

    The presumption is that you might wish to plot a smooth surface that connects the 3-d data.

    But you might also wish to write some program which requires interpolated (z) values at some new (x,y) 2-d points.  And you do not yet know what these 2-d point pairs are. So a pre-formed Array of points  at which to interpolate may not suffice.

    Instead of using a pre-formed Array of output points, we'll contruct a procedure named `B` which can be supplied with a new (x,y) 2-d output point and (if that point lies within the original range) return an interpolated (z) value.

    This procedure `B` can also be plotted, using the usual `plot3d` comamnd. It won't plot quite as fast as would a pre-computed and pre-interpolated finer grid of (x,y) values, but it should plot nicely. And the surface can be made quite smooth, by merely increasing the number of plotted points using plot3d's usual numpoints option. (Maple does not currently do "adaptive" 3-d plotting, so there's also no advantage in that respect.) But `B` does solve the secondary task, of being able to compute for any subsequent (x,y) point.

    We can even integrate and differentiate `B` numerically. Of course we should keep in mind that this is somewhat error prone, since on top of usual issues with numerical differentiation there is also fact that we make the choice of interpolation method! The entire interpolated surface will differ considerably according to whether a spline, cubic (or other) interpolating scheme is chosen!

    We'll use P and T as the x- and y- grid points, below, since "a name is just a name" and our choice of variables is arbitarary.

    plot_interp.mw

    Herbert A. Millington
    Chair - Search Committee
    412A Clarkson Hall, Whitson University
    College Hill, MA 34109

    Dear Professor Millington,

    Thank you for your letter of March 16. After careful consideration, I regret to inform you that I am unable to accept your refusal to offer me an assistant professor position in your department.

    This year I have been particularly fortunate in receiving an unusually large number of rejection letters. With...

    25_04_2011.zip

    From the work of the Russian MAC.
    3.000 visitors a day, about 20.000 visits per day

    http://webmath.exponenta.ru/

     

    One useful feature of the `evalf` command is that it remembers previous results. But it also stores the current value of Digits as well as its input argument, to be associated with the remembered result.

    There are two reasons for this. The fancier reason is so that, when Digits is reduced from that of an earlier successful computation, `evalf` can simply round off the earlier result to the desired number of decimal digits. The more basic reason is that `evalf` might...

    In part due to a large number of requests on MaplePrimes, the command ?plottools,getdata was added to Maple 15. This new command gives programmers a better way to access the internals of plots and do things with the data they contain.

    I was trying to come up with something really fun to do with this command, and another recent obsession came to mind: the game Minecraft.  Minecraft is nice, since like Maple it is written in Java and runs on lots of platforms!  For the uninitiated, Minecraft is a a sort of mostly unstructured "sandbox" game. The player starts in alone in a procedurally generated landscape consisting of blocks. They player can collect blocks with their hands or with tools and they use them to build new things. The wide array of things that people create in Minecraft is staggering.

    So, I thought I would write some commands to export 3D plots in Maple to block structures in Minecraft.

    I can no longer see answers to questions or added comments to posts.

    I was able to view them last night. 

    So there is a maximum number of conditions that one can set... good to know!

    I tried your solution, and it does work. I'll just have to determine the values of my b1 and b2 parameters with a little programming.

     

    Thank you very much!

    Classic Triangle Peg Board GameIn high school I was briefly fascinated by a triangular "jump all but one" game, commonly found at Cracker Barrel restaurants.  The basic premise is that any peg can "jump" over an adjacent peg to occupy the empty hole next to the jumped peg.  The jumped peg is then removed.  The goal is to continue jumping pegs until there is only one left.  


    The instructions on the face of the Cracker Barrel version of this game say, "LEAVE ONLY ONE -- YOU'RE A GENIUS".  Wanting to claim the right to call myself a genius, unlike ordinary kids, who might just play the game a few times, I sat down on my Turbo-XT and started writing BASIC code.  The algorithm I came up with ran a bit slow, so I directed output to my printer and let it run over night.  In the morning the program was still chugging along.  I advanced the paper feed on the dot-matrix lineprinter -- the kind that used continuous feed paper with perforated edges and holes on each side.   Into view came 3 solutions represented by a string of numbers.   A quick check verified that I was now a genius.  

    Now that Maple 15 is out, I thought I should share this little application I made: GoalTracker.mw. It is an application partially inspired by the BMI tracker in Nintendo's WiiFit application; you could easily use it to track a weight loss goal. But it could also be used to track other quantifiable goals. I am posting it here mostly because it takes advantage of two new features in Maple 15.

    Ukraine-2011. The State Final Certification in Mathematics

    What must be able to solve a graduate of the Ukrainian school in 2011?
    31 variant assignments.
    Currently:
     1. Assignments reformatted in Maple.
     2. Created an interactive...

     Work plan for the Russian Maple Application Center in 2011.

     1. Popularization of the new features of Maple 15.
     2. Popularization of educational MAC-articles.

     3. The transformation of the most popular Russian-language Internet maths textbook to the business card of Maple.
     4. Further approval of Maple as the best assistant in preparation for the delivery of the Single State Exam (Russia).
     5. Further approval of Maple...

    First 122 123 124 125 126 127 128 Last Page 124 of 307