acer

32358 Reputation

29 Badges

19 years, 331 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

There have been a few related Questions. For example, see here.

acer

@Carl Love If you made `∠` be an export of that module, which simply called the ModuleApply, then this might also  work with the Operator palette's entry for that entity. If so then this would be nice for 2D Input.

@Carl Love Yep, I did it that way on purpose. But thanks for mentioning it. I'm often torn when answering, between choosing what I think performs best and what I think will be most instructive. In this case the overhead of invoking that simple v->F.v, compared to using kernel builtin map2, is quite small compared to the savings from not repeating the same two matrix-multiplications and matrix-inverse for each entry. I figured that the map syntax is easier to understand, when learning.

I also didn't mention using float[8] Matrices/Arrays, or 3-dimensioanl Arrays instead of 2-dimensional Arrays of Vectors, because I figured the OP wants a particular visual layout. (Gosh, I also hope that the 2D Math evaluation bits inside Tables and inlined and so on is on purpose, and not because the OP has gone amok in Documents.)

If anyone's wondering after reading this Poster's submissions, I have a some very fast compiled routines for doing conversions between all the color spaces that Maple's ColorTools package knows about. But my routines act on 3D float[8] Arrays/Matrices. The conversions that ColorTools can do in its own scalar Color objects is just too slow for use on large amounts of data.

@Earl I agree: there ought to be a very simple but complete example, for a procedure, in the manuals or documentation.

Here is a simple example, for a procedure.

Here is a slightly more involved answer (checking existence of library, etc), for both procedures and a module.

Here is an example, for a module, buried (too) deep in the section of the Programming Manual on authoring packages. Its the subsection "Custom Libraries", and it's pretty wordy.

@rlopez Robert, you do make an important point. With few data points the matter is quite moot. Even when the number of data points is large it means that all such methods will be restricted in accuracy. I suspect that the attainable accuracy -- and how much sense we can make of the estimated answer -- might depend on bounds on some higher derivative of the unknown function.

Is your Table inside a Section?

I had trouble with ebook creation, if I put things outside any Section.

acer

In case it makes a difference to you: in Maple 2015.1 I see theta__1 displaying with the subscript 1 in italic. But I see theta[1] displaying with the subscript 1 in roman.

I'm not sure of how much functionality has been achieved so far (it seems to be improving, piecemeal), but I suspect that this is part of the idea behind maplecloud.maplesoft.com . You can have a private group in the Maple Cloud, accessible from all of 1) Maple, 2) MaplePlayer, and 3) your browser.

That third way, using a browser and that URL, allows you to view your uploaded worksheet and interact with embedded components that you've set up within it. Using a privately owned group allows you to restrict who can view it.

I set up my own groups using the Cloud palette in Maple itself. See the overview. And also see how to create and manage groups. There are terms of use.

As I wrote, there are some limitations to what works so far. For example, I believe that all Sliders (or Meters, Dials, Gauges used as input) act as if configured for not doing continuous update. That is, a value isn't sent until the sliding action stops.

I have been experimenting with a simple kind of worksheet for this, which lets me do (somewhat) arbitary computations and plots. It's a little fiddly to get both 2D plot's point-probe and 3D plot's rotation manipulators working together, but I think I'm gettting there. And I was looking at leveraging the existing context-menu knowledge of the engine via combobox components. Let me know, if this sounds of interest.

acer

I forgot to mention the following:

You mentioned slow performance of plottools[rotate]. If you are in real need of speeding up rotation of 3D plots in particular then you might have a look at some older posts here and here. The notion of 3D plot rotation can mean a couple of different things, though. The comments in the second of those links also discusses the viewpoint option, which may or may not be the kind of rotation you mean.

More generally, it quite often is the case that code posted to this forum can be improved in performance, and the community is friendly and talented. So if you still find your code running too slow after your planned hardware upgrade then do consider asking.

@Carl Love I too delete a great many spam messages from this site.

I would like to see a filter+quarantine system be put in place. Given how many spam messages you, Preben and I are deleting collectively, I am sure that the members with adequate priviledges could deal with an expected small number of false positives in a timely many.

But I only know of one way to make such a policy be implemented by the administrators of this site: we members (who currently have the ability to do so) would all have to stop deleting the spam.

@Carl Love You wrote that `int8` is undefined. It is an export of the MTM package (which the OP was tring to utilize).

@Harry Garst you cannot utilize `with` inside a procedure.

Change remove the calls to with and replace by,

uses LinearAlgebra, MTM, StringTools;

 

 

@Harry Garst Can you append each row (string) with "\n" , using the cat command?

@Mac Dude Recreating the procedure trackElement (by invoking proc..end proc, or by sub'sing into an existing template) will usually both be less efficient than using a never changing module local instance of the desired procedure. By which I mean, if the body of trackElement doesn't ever have to change, then you don't need to recreate it by any means each time you call Track. Doing so generates garbage which has to be collected.

I saw nothing in what you originally wrote to indicate the you had any need to recreate trackElement upon each invocation of Track. I think tha Carl was explaining how Maple parses and instantiates rather than making a suggestion that subs would  solve some problem you had.

However, if trackElement does happen to depend on lexcial scoping to use some values from Track which cannot be used merely by being passed as arguments, and if all that precludes wrapping calls to trackElement in evalhf, then you may speed things up by sub'sing in as described. This is likely not the case, though, as the presence of uses LinearAlgebra withing trackElement suggests that you're not currently invoking trackElement under evalhf, because module member referencing is not supported under evalhf.

The problem of "premature evaluation" comes up enough -- with this particular kind of error message -- that it's got its own web-page. If you click on the pink error message in your Maple worksheet (and if Maple's configured to use your web browser) then your web browser should get to this page.

acer

First 321 322 323 324 325 326 327 Last Page 323 of 592