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
  • But note the mouse-over caption! See www.xkcd.com for todays (June 11, 2008) strip. This will be printed and posted at the door that seperates the Physics Dept. from the Math Dept. at most institutions.

    Tim

    Hello Everyone,

    This is more of a request for clarification than an actual problem:

    I have written a procedure that involves multiplication, inversion (using LinearSolve) and eigenvalues/vectors (using Eigenvectors) calculations. The matrices are large (~3600 x 3600), consist of floating point complex numbers, and on occasion I need to hold several in memory at once. Therefore, I want to make sure that all of the calculations (and storage of resulting matrices) are done using double precision, not arbitrary precision, in order to minimise the memory usage.

    A recent post asks how to create a Maple permutation iterator, that is, a procedure that, on successive calls, iterates through each permutation of a given input.  I suggested a routine that solved the problem, however, I wasn't satisfied with it.  It was slower than it should be.  Later I suggested an improvement.  Here is another improvement.  It uses the same algorithm (algorithm L, from The Art of Computer Programming, vol. 4, fasicle 2, by Donald E. Knuth) if the input has repeated elements, but uses a different method, algorithm T, ibid., if the input consists of distinct elements.  The sequences of permutations for the two algorithms differ, the second algorithm uses the initial order for the first element and consecutive outputs differ by one transposition.

    A random sample of length n drawn from Bernoulli distribution with probability of success prob, that has a correlation c with itself shifted back lag steps, can be generated using following procedure,

    SampleWithCorr:=proc(prob::And(numeric,satisfies(c->c>=0 and c<=1)),
    lag::posint,c::And(numeric,satisfies(c->c<=1 and c>=-1)),n::posint)
    local X,B,S,C,s,i;
    uses Statistics;
    X:=RandomVariable(Bernoulli(prob));
    S:=Sample(X,n);
    if n<=lag or s=0 then S else
    s:=signum(c);
    B:=RandomVariable(Bernoulli(abs(c)));
    C:=Sample(B,n-lag);
    if s=1 then 
    for i from lag+1 to n do
    if C[i-lag]=1 then S[i]:=S[i-lag] fi od;
    else for i from lag+1 to n do
    if C[i-lag]=1 then S[i]:=1-S[i-lag] fi od
    fi fi; S end:
    
    A:=Matrix(2,3,1,datatype=float[8]);
                                 [1.    1.    1.]
                            A := [              ]
                                 [1.    1.    1.]
    
    ArrayTools:-AddAlongDimension(A);
    
                                   [2., 2.]
    
    B:=Matrix(3,10,1,datatype=float[8]);
    
                 [1. , 1. , 1. , 1. , 1. , 1. , 1. , 1. , 1. , 1.]
                 [                                               ]
            B := [1. , 1. , 1. , 1. , 1. , 1. , 1. , 1. , 1. , 1.]
                 [                                               ]
    

    let the elements of each of the following sets

    1. A or B

    2. ( B or C)'

    3. ( D - C)'

    4 (A' or B' ) - ( A or B)

    5. ( C and D)' or B

    6. P (A)

     

    Can anyone explain the following (in Maple 11):

    >maptype(set,evalf,[2.2222]);

     returns   [2.2]

    whereas

    >evalf([2.2222]);

     returns [2.2222]

    My reading of the help page is that if [2.2222]  is not of type set (which it isn't) then maptype should return evalf([2.2222]);   It would seem that in this context, evalf is acting as evalf[2] independent of the prevailing Digits.

    Some time ago, I confronted the usefullness of the Table element of Maplets, and found out it was something marely to show data that was known on design time, no posibility to dinamicly inject data on it for example on a result table after a process, but in the past days I met MatrixBuilder, on the Student, LinearAlbegra package, and I wonder first if that is a maplet, and second, if that is a table element, I tried to crack on the source code of it, but no info came out.

    Someone knows what is this window? or if someone is able to crack the source can show me the table part?

    I'd like to suggest that someone with administrative access monitor this site on non-business days. Quite a few times now this site has gone down on a Friday evening and not been available until the following Monday morning. Or if this is actually scheduled maintenance then perhaps that could be announced.

     

    i have a computer with windows Vista and i saw that maple 7 doesn't work on vista.

    so,I wonder if maple 7 worksheets and .mpl files can be read on maple 12 which works with Vista.

     

    When you highlight an equation in Maple and drag it to another program, a word processor for example, a small image of it is produced. It would be great to be able to select the format and resolution of these images. Specifically, it would be nice to be able to choose from jpg, gif, or a pdf clipping, and to choose compression levels and resolution, whether or not to include a background mask (or just the text itself), and how much margin to add to the clipping.
    When I click on the help menu, Maple hangs for a second or two (spinning beach ball) before it shows the menu. None of the other menus exhibit this behavior, and the help system opens very quickly if I use the button on the button bar, rather than the menu. Is anyone else experiencing this? Any workarounds? Thanks, Paul ps, MacBook Pro, 2GB ram, OS X 10.5.2, 320GB hard drive.
    Upgrading to Leopard introduced some conflicts with Maple 10 and 11, apparently arising from the new Java implementation. There are a few threads in this forum which address most of the issues. However, one has, for me, persisted, and I haven't seen it addressed anywhere else online, so I figured it might be good to start a topic.

    We are pleased to announce that the winner of the monthly Maple Mentors Award for May is Dr. Aleksandrs Mihailovs (aka alec).  Dr. Mihailovs will receive a prize of his choice to thank him for his involvement with the MaplePrimes community.

    Congratulations...and keep on posting!

    ...and the only way I found to recover is to kill Maple.

    ~Rich~

    First 196 197 198 199 200 201 202 Last Page 198 of 306