Mac Dude

1576 Reputation

17 Badges

14 years, 223 days

MaplePrimes Activity


These are questions asked by Mac Dude

I was using "eliminate" to combine a set of equations removing some variables and getting a clearly wrong result. So I looked at the docs and the first example, and I find I don't understand its result either. Here is the example:

sol:=eliminate( {x^2+y^2-1=0, x^3-y^2*x+x*y-3=0}, x); # eliminate x from this set & leave one eqn of y

This returns:

I have a somewhat time-consuming numerical integration which is needed for many different parameters so I'd like to parallelize the various integrations. Threads:-Seq should be just the ticket for this; so I write:

respr128:=[Threads:-Seq(evalf(Int(S(ener,Ecrit)*rangeexp(amp,depth/4,t0[128]),ener=0.001..10*Ecrit,method=_d01ajc,epsilon=1.0e-5)),depth=1..36)];

The functions S and rangeexp are defined thus:

S:=(omega,omega_c)->(9*sqrt(3)/(8*Pi)*omega/omega_c...

Likely has been asked before, but I cannot find the answer:

I have a table with a good number of entries, all of them indexed by strings. I'd like to sort the table by ascending index (i.e. alphabetically A...,B... etc) before I write the result to a file. Obviously, the entries have to stay with their respective indices.

Like:

Table([B=4,C=2,A=3]); to be sorted as A=3,B=4,C=2.

The sort command in Maple works with Arrays only; I understand.

This is a follow-up question to my last-name evaluation question a few days ago.

Well, I thought I had got it, but look at this trivial example involving records:

r:=Record(p1=parm1,p2=parm2);

r:-p2;

         parm2

parm2:=0;

r:-p2;

        0

eval(r);

      

I have been grappling with the Maple concept of last name evaluation and would appreciate a more detailed explanation than is available in the Programming Guide (too brief) or the help page (confusing).

What I think I understand is this: Normally, Maple evaluates an expression fully until all assignments are resolved, leaving me with an expression having only "values" (in a generalized sense, could be strings, numbers, what have you) and "names", which are variables...

First 19 20 21 22 23 24 Page 21 of 24