Carl Love

Carl Love

28100 Reputation

25 Badges

13 years, 106 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@rashmi Show me exactly what you did to get plunging orbits.

@Alejandro Jakubi I don't like that my method requires two sets of quotes; I can't explain that. But note that the % method requires the use of in the target expression as well as the rule. This means that a substitution needs to be made in the OP's Intat expression since it was programmatically generated. Also, the % technique will ultimately require two applications of value: the first will change %Intat to Intat (and change Sum to sum), and the second will change Intat to intat. To overcome this, a procedure can be made

ToSumIntat:= (J::'Intat'(algebraic, symbol= algebraic))->
     value(
          applyrule(
               %Intat(
                    A::algebraic*Sum(v::algebraic,r::{name,equation})*
                    B::algebraic,u::equation
               )= %Sum(%Intat(A*v*B,u),r),
               subs(Intat= %Intat, J)
          )
     )
;

Note the use of %Sum on the rhs of the rule.

So, I think that the % technique is ultimately more to type.

Please give us the PDE and the pdsolve command that you used to get the Whittaker functions.

Give a specific example please.

@rashmi Any plots on the same axes can be combined with plots:-display. Or you could specify multiple plots in the odeplot command, like this:

Sol:= dsolve(
     {diff(r1(t),t)=cos(t), r1(0)=0, r2(t)=2*sin(t), r2(0)=0},
     {r1(t), r2(t)},
     numeric
):
plots:-changecoords(
     plots:-odeplot(Sol, [[r1(t), t], [r2(t),t]], axiscoordinates= polar),
     polar
);

@mehran rajabi 

Setting maxfun= 0 will remove the maxfun restriction.

@Preben Alsholm 

Maple's multiple assignment allows a swap of variables without need of a temporary variable, and it's more efficient to do it that way.

BubbleSort:= proc(L::{list,Array,Vector})
local i, j, T:= Array(L), n:= numelems(L);
     for i to n-1 do
          for j to n-i do
               if T[j] > T[j+1] then
                    T[j],T[j+1]:= T[j+1],T[j] #swap
               end if
          end do
     end do;
     convert(T, whattype(L))
end proc:

BubbleSort(RandomTools:-Generate(list(float, 12)));

@Edinburgh The mistake is your usage of z in two different ways. You have z as the name of the third coordinate function and also as the table that stores the coordinate value. You should make the third coordinate function h to match f and g.

@Christopher2222

This code was copied from a post that I made to either comp.soft-sys.math.maple or sci.math.symbolic over a decade ago. At that time, gcfreq= 2^22 was large enough to effectively stop garbage collection during the course of the timing. On today's computers, that value is absurdly small. The usage of gcfreq has been deprecated.

Also, why compare time[real]? I think time(...) (processor time) would be a fairer comparison.

Making those changes, I get

M16/64 on Win 7.1 Intel i5x4 @ 3.2 GHz: 0.374 sec.

I prefer the StackExchange way. But note that there is an option on MaplePrimes to sort chronologically. It would be great if MaplePrimes were a StackExchange site, but they require a core of 200 dedicated users to start a site.

@Andriy Even shorter is

f:= `+`:

But I think that the OP wanted to ask the question about _params and was just using addition as a trivial example. I think that the OP had in mind a more sophisticated use of _params.

@Joe Riel I disagree. The relationship between $ and seq is essentially the same as that between sum and add. The $ allows for the entry and manipulation of indefinite sequences, such as

k:= 'k':  n:= 'n':
k^2 $ k= 1..n;

The backslash in \%1 is superfluous. The command might as well be

error "bad argument: %1", n

Don't expect to see the backslash in any help that you find on the error command.

@Alejandro Jakubi I've only used Grid:-Map.

@Alejandro Jakubi 

Can distributed grid mode computations be done within a single machine by means of the Grid package alone, without the Grid Computing Toolbox?

Yes. I have done it and achieved 100% processor utilization (as reported by Windows Task Manager) over 8 nodes. What would be the purpose of having the Grid package if this were not possible?

First 548 549 550 551 552 553 554 Last Page 550 of 709