MaplePrimes Commons General Technical Discussions

The primary forum for technical discussions.

Create a new Post in this category

Viewing an html application at the application center results in some problems which doesn't allow to view the application in it's html format.

I had responded to a maplesoft application where data to a .mw worksheet was no longer available and had asked them to find and fix it.

I would have hoped a response would have been put here to mapleprimes to find the data.  Unfotunately the data could not be found and the application was deleted from the application center. 

It was Analyzing Data files in Maple - Maple 10 and Maple Net - Nov 7, 2005

Here is the link http://www.maplesoft.com/applications/view.aspx?SID=1685 ...

After making a search for applications in the applications center, they are ordered in some crazy unknown way. 

They do not appear to be ordered alphabetically by author, nor by title and also they have no date published attached to the searched list. 

Searching for all titles by product Maple 16, we find that TEST APPLICATION created July 31 is actually listed behind Robert Lopez's Classroom Tips and Techniques: Slider-Control of Parameters in Numeric...

MapleSim now is in direct competition with Mathematica's System modeller.

I just found that out now, it could have been out for a while but they look similar.  Mathematica is already comparing it with MapleSim and essentially indicating that their modeller is superior.

Let's hear from the Maple crowd.  Is System Modeller better than MapleSim?

There is a flaw (bug) in the DEplot routine.  If you load the plottools package before using DEplot with the arrows=line option, the DEplot routine tries to use the line definition from the plottools package.  A worksheet illustrating this problem is below.

It appears the wikipedia entry for maple software is deeply in need of an overhaul to reflect new graphic modifications and for better eye candy. 

Not that it really matters but the graphics there are rather primitive and outdated. 

When using "plotsetup(png,...)" the third rotational angle is ignored.  Attached are a worksheet and the corresponding three plots that demonstrate this bug.

The explosion of cloud this - cloud that, is rather obvious now.

 

SO, I decided to check-out the cloud feature to my Maple? One problem, I cannot see - what is in it?

  • Yes, I understand, you use the cloud palette in Maple.
  • It shows the group, who the document / notebook is from, what it's title is? And such.
  • _
  • BUT, is there a web page - listing? hidden somewhere, on MaplePrimes or someplace on Maplesoft's service? (

Some Maplesoft users have been receiving emails that indicate a new patch for Maple software is available. Recipients of this message receive an attachment called Maple_Patch.zip which they are asked to extract using the password MapleSecuirityUpdate1707. Please be advised that this patch did not originate from Maplesoft and should not be opened under any circumstances. Maplesoft is currently investigating further. Please contact

The MRB constant can be computed in Maple by evalf(sum((-1)^n*(n^(1/n)-1),n=1..infinity)).

On my laptop restart; st := time(); evalf(sum((-1)^n*(n^(1/n)-1), n = 1 .. infinity), 500); time()-st gives a timming of 37.908 seconds.

Using the procedure posted at the bottom of this message st := time(); A037077(500); time()-st gives a much faster timing of 1.903 seconds.

My fastest timing for 500 digits of MRB comes from my...

Here is a hacked-up and short `convert/identifier` procedure.

The shortness of the procedure should is a hint that it's not super robust. But it can be handy, in some simple display situations.

If I had made into a single procedure (named `G`, or whatever) then I could have declared its first parameter as x::uneval and thus avoided the need for placing single-right (uneval) quotes around certain examples. But for fun I wanted it to be an extension of `convert`. And while I could code special-evaluation rules on my `convert` extension I suppose that there no point in doing so since `convert` itself doesn't have such rules.

For the first two examples below I also typed in the equivalent expressions in 2D Math input mode, and then used the right-click context-menu to convert to Atomic Identifier. Some simple items come out the same, while some other come out with a different underlying structure and display.

 

restart:

`convert/identifier`:=proc(x)
   cat(`#`,convert(convert(:-Typesetting:-Typeset(x),`global`),name));
end proc:

convert( 'sqrt(4)', identifier);

`#msqrt(mn("4"))`

eval(value(%));
lprint(%);

`#msqrt(mn("4"))`

`#msqrt(mn("4"))`

`#msqrt(mn("4"))`

`#msqrt(mn("4"))`

lprint(%);

`#msqrt(mn("4"))`

convert( 'int(BesselJ(0,Pi*sqrt(t)),t)', identifier);

`#mrow(mo("∫"),mrow(msub(mi("J",fontstyle = "normal",msemantics = "BesselJ"),mn("0")),mo("⁡"),mfenced(mrow(mi("π"),mo("⁢"),msqrt(mi("t"))))),mspace(width = "0.3em"),mo("ⅆ"),mi("t"))`

eval(value(%));
#lprint(%);

`#mrow(mo("∫"),mrow(msub(mi("J",fontstyle = "normal",msemantics = "BesselJ"),mn("0")),mo("⁡"),mfenced(mrow(mi("π"),mo("⁢"),msqrt(mi("t"))))),mspace(width = "0.3em"),mo("ⅆ"),mi("t"))`

`#mrow(mo("∫"),msub(mo("J"),mn("0")),mfenced(mrow(mi("π",fontstyle = "normal"),mo("⁢"),msqrt(mi("t")))),mo("⁢"),mo("ⅆ"),mi("t"))`

`#mrow(mo("∫"),msub(mo("J"),mn("0")),mfenced(mrow(mi("π",fontstyle = "normal"),mo("⁢"),msqrt(mi("t")))),mo("⁢"),mo("ⅆ"),mi("t"))`

#lprint(%);

convert( Vector[row](['Zeta(0.5)', a.b.c, 'limit(sin(x)/x,x=0)', q*s*t]), identifier);

Vector[row](4, {(1) = Zeta(.5), (2) = a.b.c, (3) = limit(sin(x)/x, x = 0), (4) = q*s*t})

eval(value(%));
#lprint(%);

Vector[row](4, {(1) = Zeta(.5), (2) = a.b.c, (3) = limit(sin(x)/x, x = 0), (4) = q*s*t})

 

Download atomic1.mw

As it stands this hack may be useful in a pinch for demos and purely visual effect, but unless it's robustified then it won't allow you to programmatically generate atomic names which match and inter-operate computationally with those from the context-menu conversion. Identifiers (names) with similar typeset appearance still have to match exactly if they are to be properly compared, added, subtracted with each other.

Extra points for commenting that the round-brackets (eg. in function-application) are displayed as black while the rest is in blue by default, if you have a workaround.  That also happens when using the usual context-menu driven convert-to-atomic-identifier of the Standard GUI.

Extra points for noticing that function names like `sin` are italicized and not in an upright font, if you have a workaround. How to discern which instances of fontstyle="normal" should be removed?

Points off for commenting that this whole hack doesn't provide anything new or extra for getting around automatic simplification.  :)

This is a one-liner hack. But maybe together we could turn it into something that closely matched what the context-menu generates.

Many of us know that issuing plotting commands produces various kinds of plot data structure, the details of which are documented on the plot,structure help-page. That page covers most of the details, and a thorough read can reveal that the numeric data of a plot is often stored within such structures as either Array or Matrix.

But what about the result of a call to

colour and 2D point-plots...

June 19 2012 acer 10546 Maple

Someone asked me the other week whether a color gradient could be easily applied to a high density point-plot, either vertically or horizontally graded.

Without thinking, I said, "Sure, easy." But when I got to a computer, and gave it a little thought, I realized that it's not that easy to do it efficiently. And it really ought to be, even for tens of thousands of points.

There is a help-page plot,color which briefly describes some things that can be done with coloring plots. As of Maple 16, it mentions a "color data structure" which can be created by calls to the new ColorTools package. There is an example on that page for a single color, but not for several colors concurrently. Using Colortools to get a list of colors, for many points, can be done. (And there ought to be such an example.) But for the case of many data points that uses quite a lot of memory, and is slow.

Also, there is no 2D plotting equivalent to the 3D plotting colorfunc functionality. There ought to be. And just as the 3D colorfunc should be fixed to take three arguments (x,y, & z) any new 2D colorfunc should be made to take two arguments (x & y).

So, how can we apply a color gradient on a 25000 2D-point-plot, shaded by y-value? One way is to notice that the various 2D and 3D plot data structures can now store an efficient m-by-3 (or m-by-n-by-3) C_order, float[8] Array for the purpose of representing the chosen colors. (That is not documented, but can be learned by observation and inspection of various example plot structures.) We know that such an Array is relatively memory-light, and can be produced very quickly.

What this task has become is a 2D version of this method of inserting a custom made color sequence into a 3D plot, but more efficient on account of using a float[8] Array.

To get some decent timings the attached worksheet uses the time[real] command. Timings are computed both immediately after computation (same execution block) as well as after plot rendering (next execution block).

It takes about 1 sec for the Maple 16.01 64bit Standard GUI on Windows 7 to throw up and render the plot, for both methods.

It takes 3.4 sec, and a 108 MB increase in allocated memory, to compute the plot data structure result using ColorTools and a list. But it takes only 0.45 sec, and a 20.5 MB increase in allocated memory, to compute an equivalent plot data structure using the float[8] Array. (Timings on an Intel i7-960.)

[worksheet upload is misbehaving. So inlining the code.]

restart:
N:=25000:

xy:=LinearAlgebra:-RandomMatrix(N,2,generator=0.0..1.0,
                                outputoptions=[datatype=float[8]]):

str:=time[real]():

plots:-pointplot(xy,
                    color=[seq(ColorTools:-Color([xy[i,2],0,0]),i=1..N)],
                    symbolsize=4);

time[real]()-str;

                             3.323

time[real]()-str; # in new execution group

                             4.400
kernelopts(bytesalloc);

                           107646976


restart:
N:=25000:

xy:=LinearAlgebra:-RandomMatrix(N,2,generator=0.0..1.0,
                                outputoptions=[datatype=float[8]]):

str:=time[real]():

p:=plots:-pointplot(xy,color=red,symbolsize=4):

c:=Array(1..N*3,(i)->`if`(irem(i,3)=1,xy[(i+2)/3,2],0),
         datatype=float[8],order=C_order):

subsindets(p,specfunc(anything,COLOUR),z->'COLOUR'('RGB',c));

time[real]()-str;

                             0.483

time[real]()-str; # in new execution group

                             1.357
kernelopts(bytesalloc);

                            20545536

A better approximation gives more digits of accuracy in the result per digit of precision used in the computation than a good approximation does.  I was wondering if anyone could come up with a better approximation to the MRB constant than 31/165, 

3 4 5 6 7 8 9 Last Page 5 of 70