sand15

1107 Reputation

15 Badges

10 years, 322 days

MaplePrimes Activity


These are answers submitted by sand15

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

First 6 7 8 Page 8 of 8