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
  • Here's a tip for people new to Maple or to 2-D input: always use a space for implied multiplication. 2-D math input in Maple allows for implicit multiplication, which is writing a multiplication operation without an explicit multiplication operator. An example is x y. The space is not always required in cases where there is no ambiguity. However, it is highly recommended that you include it. An example that catches many new users (and some experienced ones as well) is s(t+u). This does not mean s times t+u, but the function s applied to t+u

    "I've seen this element before..." Often we are faced with the problem of building up sets incrementally, by removing pieces one at a time from a larger whole. The bottlenecks in this case are usually: 1) adding a small set X to a large set S (copies S and X, making this ~O(|S|+|X|)) 2) removing elements of the large set S from the small set X (binary search: |X|*log(|S|)) A classic example of this is a breadth-first-search. We start at one vertex of a graph and in each iteration we add the set of new neighbors X to the set of vertices S that have already been found. We can make this more useful by making the program return the sets of new neighbors found in each iteration, that is, the sets of vertices that are distance 1, 2, 3, etc. from the initial vertex.

    Which of these do you prefer, and why?

    foo := proc(T)

    ...

    if type(s,`+`) then
    r := map(foo,s);
    fi;

    ...

    end;

    foo := proc(T)

    ...

    if type(s,`+`) then
    r := 0;
    for x in op(s) do r := r+foo(x); od;
    fi;

    ...

    end;


    The error message "too many levels of recursion" is sometimes misleading. In the problem below, the error source was an undefined list variable. This hint may help to find programming errors.
    In this example, look at E1. Is it E2 or E3? We cannot tell from the way Maple displays them. For the answer, keep reading. Shouldn't Maple put parentheses or something in its rendering of E2 at least?

    > E1 := f @ log @@ 4;

    > E2 := (f @ log) @@ 4;

    MaplePrimes seems to have a problem with <maple> tags for modules. When I wrap the tags around Statistics:-ErrorPlot(a,b) the “Statistics:-” gets elided.

    One issue that often confuses users is local versus global optimization in Maple. I'm just going to give an overview here and will explore specific optimization topics more deeply in future blog entries. Please note that I'm covering only the numeric optimization methods here. I'll leave discussion of the exact methods in Maple to others more knowledgeable about those areas.

    The Optimization package is built into Maple and is available to all users. This is primarily...

    I am running Maple under Windows XP Pro, SP2. A couple week ago, I upgraded from Maple 11.0 to Maple 11.01. Everything went fine. According to Help>About, I had the version from June 8 2007, Build ID 296069. Just now, when I started Maple, there was a pop-up notice telling me that there was a newer version of Maple available. So I downloaded and installed the new version. According to Help>About, I now have the version from July 10 2007, Build ID 303882. There seems, though, to be an inconsistency: kernelopts(version) says     Maple 11.01, IBM INTEL NT, Jun 8 2007 Build ID 296069

    When working with large sparse linear systems you often want to look at their non-zero structure, however Maple's existing tools are all designed for dense matrices. I wrote a little tool to produce images like this in reasonable time. You can download the code here, and the rest of this post is a quick tutorial on how to use the included command. Maple 11 is required.

    Dear all, a:=.5; s:=.2; sol:=solve(1+(5*x)*(log(5*x)-1)=.5*v-sqrt(k)*x, x); eval(sol, [k=.98, v=.4]); gives me 0.2019811135 but there should be 2 solutions; if I put the values of k and v before solve: > a:=.5; s:=.2; k:=.98; v:=.4; a := 0.5 s := 0.2 k := 0.98 v := 0.4 > sol:=solve(1+(5*x)*(log(5*x)-1)=.5*v-sqrt(k)*x, x); sol := 0.2019811135, 0.1288902502 i need the 2nd solution and the purpose of this code is so that i can change the value of k and v so I need to make the 1st 3 lines work.
    The following is true 'sum(min(2, j)/factorial(j), j = 1 .. infinity)' = 'sum(min(2, j)/factorial(j), j = 1 .. 2)' +'sum(min(2, j)/factorial(j), j = 3 .. infinity)'; But Maple 11.01 thinks it isn't. The answer it gives is 2*exp(1)-2 = -3+2*exp(1) The answer on the right is correct. One the left, Maple seems to think that min(2,j)=2 (which is correct except for the first term in the sum). The problem doesn't seem to arise for finite sums.
    I, Andy Gijbels, added 2 new applications on www.maplesoft.com * Tower of Hanoi: Graphical solution (animation) * Double spring pendulum (animation) Feel free to rate or leave comments Andy
    The last comment on this thread Singular Planet needs to be removed. This is Spam and does not belong here. Just thought I would point it out because sometimes things like this get missed. Regards, Georgios Kokovidis
    Question: How do I generate tickmarks in multiples of Pi? The answer has been posted before but this question comes up often enough that it is worth repeating. In Maple 10 and earlier versions, you had to build a custom list of tickmarks, and the only way you could get the Greek pi symbol was to use the Symbol font. In Maple 11, you can use the new 'spacing' structure with the 'tickmarks' option. To get tickmarks in multiples of Pi, use: > plot(sin(x), x=0..8*Pi, tickmarks=[spacing(Pi), default]); To get tickmarks spaced by 2*Pi, replace spacing(Pi) with spacing(2*Pi). To get the tickmarks occuring on the odd multiples of Pi, use spacing(2*Pi, Pi). The second argument is a fixed value from which the other tickmarks are determined.
    In statistical analyses, it is common to fit a model to data where, say, the x-coordinates are known exactly and the y-coordinates are known inexactly, with some assumed error distribution. It is often useful to plot the data, with bars indicating the std. deviation (say) of the potential error in the y-coordinates. Maple's Statistics package has a procedure for doing that: ErrorPlot. ErrorPlot, however draws error bars horizontally, instead of vertically. I do not understand this, especially as the Help seems to indicate that the errors are in the y-coordinates, as usual in statistics. Why are ErrorPlot error bars drawn horizontally?
    First 233 234 235 236 237 238 239 Last Page 235 of 307