acer

33089 Reputation

29 Badges

20 years, 179 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@mstevens My sheets show how to do most all that easily, IMNSHO. 

Its true that the functionality is not built into stock Maple. Not all that surprisingly as Maple has to support scientists and mathematicians as well as engineers. Often the needs of those groups are in opposition.

I can make Maple do many kinds of thing. I suggest that you focus on telling how you want my phaser objects (cited above) to be improved. I mean specifics. I am happy to help.

The objects I coded already act like phasors and don't be distracted by my caution above about phasor-phaser multiplication. You would be better off asking me to adjust the code than attempt it IMO. 

One of the things I can do is add right click context-menu items to change representation mode (degree polar aka phasor vs radian polar vs explicit imaginary etc). Those would return on a new line though, when toggled. At present only numeric formatting and units can be adjusted/toggled "in situ", but not other right click actions.

@mstevens I added phasor to the tags in that Question for which I cited my Answer above.

Note that "phasor" may be a slight misnomer for what I coded, in the following technical sense. I have a suspicion that two arbitrary phasors cannot just be multipled together, although scalar multiplication of a phasor is valid. Thecode I wrote does compute such a product of two of its objects (and you might be able to amend the static `*` export for that coded object in this regard, if so inclined...). So I suppose that technically it's more a degree-polar representation of a complex number than a phasor proper. Let me know if you run into problems.

@Carl Love Yes, I mean the garbage-collector of the JVM, which is distinct from Maple's kernel's garbage collector. The JVM garbage-collector does memory management of objects in the GUI's (JVM's) memory space.

Something like a PLOT3D Maple structure is stored internally in the Maple kernel as a DAG, when constructred via a Maple command. But when "printed" by Maple command the kernel sends it to the GUI which stores it in its own internal representation. Such objects in the JVM are managed by the JVM's own memory management system (the JVM's garbage collector) and that has little-to-nothing to do with whether the Maple kernel still has a reference to its own internal DAG representation. They are quite separate things.

If you look at this tutorial (in in particular the "Key Hotspot Components" in the "Exploring the JVM Architecture" tab) you can find where it states, "The heap is where your object data is stored. This area is then managed by the garbage collector selected at startup. Most tuning options relate to sizing the heap and choosing the most appropriate garbage collector for your situation."

In some older versions of Maple, depending on the JRE version in use, it was sometimes better for Maple's Java GUI's performance to allocate a larger JVM heap. That could sometimes be done with an edit to Maple's GUI's initialization file (not the user's Maple language initialization file, confusingly known by the same kind of name). But note that, with some versions, the JVM wouldn't start if this was set too high (see also Search results on Mapleprimes for keyword maxheap). I don't advise anyone to mess with that stuff unless their GUI doesn't launch with default settings.

If I recall Maple 2016 uses "Java 8", ie. some version 1.8.xx. On Windows 7 and 64bit Linux I can execute the following 1D plaintext Maple command (if system calls are enabled in GUI Options) from within my Maple 2016.1 to determine the Java version in use.

system(cat(kernelopts(':-mapledir'),"/jre",
    `if`(kernelopts(':-platform')="windows",
         "/bin/java.exe",
         cat(".",StringTools:-SubstituteAll(kernelopts(':-system')," ","_"),
             "/bin/java")),
    " -version")):

That shows something like java version "1.8.0_66" in my 64bit Linux Maple 2016.1, while it showed java version "1.6.0_45" in my 64bit Linux Maple 2015.2.

I suspect that the switch from Java 6 to 8 has improved GUI performance, and some of that may [1, 2] be due to improved JVM garbage colleciton.

@Markiyan Hirnyk I thought that you'd be interested in a shorter example (of your bivariate example with the spurious solution of z=0).

From your problematic example above I first got here:

restart;                
ee := x-(x*(x-z))^(1/2):
solve( ee, {z} );       
                                                          {z = 0}

eval(ee, %);            
                                                              2 1/2
                                                        x - (x )

And from there I got to my univariate example above.

For anyone finding this Question by searching, a variation on using the caption option, with color and multiple lines, is here.

@Markiyan Hirnyk  hmm

solve( x - (x^2)^(1/2) );
                                        x

@John Fredsted It's a bug in DifferentialGeometry (not the interface), that it does not correctly reset the prompt through a call to the interface.

pagan also showed the convert to list and `+`,... in a recursive solution in an answer made in 2009. I see nothing new in Omer's answer.

@Carl Love Sure, thanks. I deliberately kept the explciit seq call, with its index, to try and make it more clear for the OP.

@MAHMOUDHM And I deleted that duplicate of this question. Please add your additional details here, rather than spam the site with duplicate posts.

@Carl Love  Over the past few years I have submitted several request/bug reports about the need for more examples of the great power of this very popular command, but sadly to little avail. Another vote up.

@MortenZdk  Where does the documentation suggest demoting Digits for the purpose only of controlling the format of display of floats!?

Can you modify that `exportplot` procedure to assign the temp filename string (fully qualified) to a global variable, or to return that string?

acer

@Østerbro  Sorry I am away and will not have maple/computer access until Aug 13. 

What you want can be done. E.g. using convert unit_free to separate and simplify the unit terms and the the other process to handle the rest.

@Adam Ledger Please upload any edited revision of your worksheet in a new Comment on this thread (use a new filename, say), rather than in a whole new Post. That way Carl's comments will still be associated with it.

First 308 309 310 311 312 313 314 Last Page 310 of 605