acer

32747 Reputation

29 Badges

20 years, 112 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

I've been working on some blog post(s) on this topic, including some code, in a few spare moments. I intend it as a branched continuation of this interesting thread.

Pls stay tuned. I'll add a link here when I post.

The code consists of improving on the naive approach of doubling-Digits-until-it-stops-changing by using shake instead at each increase to the working precision (Digits). I started off focusing on constant expressions, but then got a little side-tracked with 2-argument `eval`.

Since I'm using `shake` then my approach relies on the existence of an appropriate `evalr` extension in order handle function calls. So it doesn't do anything for hypergeom, for counterexample.

To the original poster: Note that some numerical commands in Maple provide optional arguments to specify an error tolerance. Eg, dsolve/numeric or evalf/Int.

acer

I've been working on some blog post(s) on this topic, including some code, in a few spare moments. I intend it as a branched continuation of this interesting thread.

Pls stay tuned. I'll add a link here when I post.

The code consists of improving on the naive approach of doubling-Digits-until-it-stops-changing by using shake instead at each increase to the working precision (Digits). I started off focusing on constant expressions, but then got a little side-tracked with 2-argument `eval`.

Since I'm using `shake` then my approach relies on the existence of an appropriate `evalr` extension in order handle function calls. So it doesn't do anything for hypergeom, for counterexample.

To the original poster: Note that some numerical commands in Maple provide optional arguments to specify an error tolerance. Eg, dsolve/numeric or evalf/Int.

acer

@Axel Vogt Hey Axel.

It needs the Standard GUI of Maple 14 or later, since accessing Maple Cloud worksheets can only be done at present via a special "cloud" entry in the palette panel.

So yes, one can upload a .mws worksheet, once one has opened that in the Standard GUI. But when someone else downloads it then it doesn't seem to be either .mw or .mws until such time as it gets saved to a file.

cheers,
acer

Not as terse as may be done in APL, but still,

Vector(5,exp);

exp~(<($1..5)>);

exp~([$1..5]);

More seriously, could it be that the Original Poster's issue is related to exp(1), exp(2), etc being exact quantities rather than float approximations? If so, then just apply the command evalf to most of the earlier responses.

acer

Not as terse as may be done in APL, but still,

Vector(5,exp);

exp~(<($1..5)>);

exp~([$1..5]);

More seriously, could it be that the Original Poster's issue is related to exp(1), exp(2), etc being exact quantities rather than float approximations? If so, then just apply the command evalf to most of the earlier responses.

acer

You have not told us what platform or operating system you are using.

Can you use keyboard short-cuts instead? (Ie. on Windows, Ctl-v instead of right-click->Paste)

acer

restart:

Mnemosyne:=proc(x::posint)

  option remember;
  local Xc;

  if x=1 then return x,0; end if;

  if x=2 then Xc := 1,0;

  elif irem(x,2)=0 then Xc := procname(x/2);

  else Xc := procname(3*x+1);

  end if;
  x, Xc[2]+1;

end proc:

st:=time():

plots:-pointplot([seq(Mnemosyne(i),i=1..10000)]);

time()-st;

acer

restart:

Mnemosyne:=proc(x::posint)

  option remember;
  local Xc;

  if x=1 then return x,0; end if;

  if x=2 then Xc := 1,0;

  elif irem(x,2)=0 then Xc := procname(x/2);

  else Xc := procname(3*x+1);

  end if;
  x, Xc[2]+1;

end proc:

st:=time():

plots:-pointplot([seq(Mnemosyne(i),i=1..10000)]);

time()-st;

acer

How about applying it to a quasirandom sequence generated by Rule 30.

(nb. Rule 30 must be somebody's obsession, by rules 34 and 36.)

acer

FWIW, this is integer sequence A006577 from OEIS.

Wikipedia also has information on the Collatz Conjecture.

acer

FWIW, this is integer sequence A006577 from OEIS.

Wikipedia also has information on the Collatz Conjecture.

acer

A followup comment.

You can now find the Harmonic Analysis package on the Application Center.

The (slightly thin) documentation suggests a command for removing high frequency noise from a signal. Here's what I get when I apply that same call to the data M above.

MHA := HarmonicAnalysis:-AFT(M, 0.97, 0):
plots:-pointplot([seq([i, Re(MHA[i])],i=1..n)], style=line,view=[0..1000,-20..20]);

 

You can compare the above result with the very last plot in my Answer (which to my eye looked much like the completely straight line I expected for the main signal will all noise removed).

acer

A followup comment.

You can now find the Harmonic Analysis package on the Application Center.

The (slightly thin) documentation suggests a command for removing high frequency noise from a signal. Here's what I get when I apply that same call to the data M above.

MHA := HarmonicAnalysis:-AFT(M, 0.97, 0):
plots:-pointplot([seq([i, Re(MHA[i])],i=1..n)], style=line,view=[0..1000,-20..20]);

 

You can compare the above result with the very last plot in my Answer (which to my eye looked much like the completely straight line I expected for the main signal will all noise removed).

acer

@gkokovidis Those two data files are have links on the page from which this Post was branched.

Namely, MontrealWL.txt and TorontoWL.txt on this page.

What version of Maple are you using?

Posting an example which reproduces the problem would be a good next step.

acer

First 457 458 459 460 461 462 463 Last Page 459 of 600