535 Reputation

11 Badges

8 years, 186 days

MaplePrimes Activity

These are answers submitted by sand15

I keep opened this question for any other person who could face this same problem.

Here is the solution in the case MyNewList contains the list of elements to add to MyList

DO NOT USE   Maplets :-Tools :-Set(DDB(itemlist)=MyNewList)

for k in MyNewList do
   Maplets :-Tools :-Set(DDB(appenditem)=k)
end do;

The bold-written restriction above can generally be bypassed by a proper definition of MyList and of MyNewList

Hope this can help even if the Maplets seem old-fashioned


I use maple 2016 on a Windows 7 PC.
I provide tou a screen capture of the Maple code (I can't upload a file by using the green arrow).
First thing : change search(...) text by StringTools:-Search(...)

PS : don't worry about the name of the file : the first test I made was saving x := [ evalf[10](Pi) ]

I may be mistaken, but it looks like you want to compute quantiles at regular intervals ???

If it is the case, the following may help you
(after loadings of the suitable packages)

q := i -> Quantile(GammaDistribution(4.5/100, 2.5), 1/(2*(N+1))+1/(N+1)*i, numeric) + 0.068

[Seq(q(i), i=1..(N-1))]


Note 1 : with Maple 2015 (Windows 7) your code returns me a "connection to server failed"

Note 2 : the sequence [seq(q(i), i=1..(N-1))]  runs very quickly : using Threads does not seem necessary

Note 3 : the CDF is a non decreasing function of its argument, and even here a strictly increasing one. As a consequence there should be only one solution to the "solve( (1/(2*(N+1))+1/(N+1)*i)=cdf(x),x)" command of yours.
In practice, for a reason I do not know, this command returns many solutions, some real and others complex (probably the reason for which you load the RealDomain package ?).
Using "Quantile" prevents these spurious solutions.

I cannot provide you the piece of code I have written for computer-related problems
But what I did is sufficiently simple for me to give you a sketch of it

Step 1 :

EasySys := {diff(v(t), t)=0, diff(h(t), t)=w(t), siff(w(t), t)=0}  # if I am not mistaken
EasySol := dsolve ( EasySys, {v(t), h(t), w(t)})                       # which can be done manually

Step 2:

HarderSys := {diff(x1(t), t)=v(t)*cos(h(t)), diff(x2(t), t)=v(t)*sin(h(t))}
HarderSys := subs(EasySol, HarderSys):
HarderSol := dsolve(HarderSys, {x1(t), x2(t)})                        # easily found too

FullSol := EasySol union HarderSol;

I am not certain it is the solution you were searching for (no numerics here)
Probably someone will provide you a clever solution

Hope I helped

try  printf("%g\n",p) to add a carriage return and printf("%g\n\n",p) to skip a line after the print

1 2 3 Page 3 of 3