acer

32490 Reputation

29 Badges

20 years, 7 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@Aakanksha Could you attach a .mw worksheet containing the code you've used, with output, and also at the end of it could you call the command,

kernelopts(version);

@casperyc Do you want to see results for all the objective evaluations computed internally by DirectSearch, or only those which improve on the previous best?

Do you want to see the objective value, or a 3D point plot of the x,y,z values?

@Axel Vogt It seems to me to have been a bug in the numerical evaluation of MeijerG in the special case of floats present in  certain parameters. The problem was present in Maple 9.5, and fixed some time later (Maple 11?).

In Maple 9.5 the errant result occurred no matter how high I raised Digits.

And in Maple 9.5 the conversion of those parameters to exact rationals is a workaround (with no extra precision required).

@casperyc I think I cautioned against having multiple calls to `p` and running with the menubar's triple-exclamation (execute worksheet). It seems necessary for the GUI to finish inserting components before calling `p` again, else perhaps it gets confused about the names of inserted components.

It does seem ok to call `p` (once each) in separate and multiple execution groups or document blocks, as long they don't occur in too rapid a succession.

Capital P is the local variable which gets assigned the plot. I'm not sure why it might return unevaluated. If you run into issues with this then you could send me a private message and your code. I didn't use any try..catch mechanisms or other checks that plots had indeed been created. Were you planning on calling it many times, or were you just trying to stress test it all?

@casperyc Here is a version in which the procedure creates and embeds a Plot Component, updates it while computing, and then finally returns the final plot (after apparently clearing off the embedded component).

Calling procedure `p` shows intermediate results by updating an embedded Plot Component, but the return value of a completed call to `p` is an actual plot and can be assigned like any other result (as long as the call to `p` is allowed to complete).

It works best in a Worksheet, in an execution group. It may work in a Document, in a paragraph (document block). But it appears to not work as in an execution group in a Document. It likely works best in Maple 18.01, and not at all in anything before 18.

The technique is full of undocumented commands. The basic idea is also a trick, relying on the fact that in M18 (and perhaps M17) a procedure call in an input region can have not only a usual output region but also a task region. (This is how Grading:-Quiz and Explore work, btw.)

The attached worksheet may only work as intended if the seperate examples of calls to procedure `p` are in separate execution groups.

ticker2.mw

Upon reflection, it might be easier to handle efficiency as simply as possible here. I've pretty much just relied on the garbage collector doing a decent job. And an easy improvement is to only update the plot every 100 (or whatever) iterations.

@casperyc It can be made to plot either all the points, or just the later ones, sure. It's ok to have A be local, but of course for efficiency Array A must be created just once outside the loop. There are more efficient ways to build the PLOT structure, yes -- more on that later. And it is possible to have the procedure emit the PlotComponent (right below) any eventual output. And distinct calls to your computation routine could emit and use their own distinct PlotComponents. The return value could also include the final plot, sure.

It'll take me a while to construct a more thorough example with these ideas. Perhaps later this evening...

 

@rightClick I see. If I try it on the output of the following command then I get the problematic behaviour you described if I have typesetting level set to "standard". But it seems to work ok if instead I have that level set to "extended".

`𝓍__2`(s) = 1/(s^2+3*s+2);

There are at least two ways to set the typesetting level to the extended mode. One way is to use the menubar choice Tools->Options-Display and change the dropmenu "Typesetting level" from being "Maple Standard" to being "Extended". Another way is with the command,

interface(typesetting=extended):

I will submit a bug report against this problem.

It works for me, in Maple 18.01 on Windows 7 64bit, using both 2D Math and 1D Maple Notation modes for input as well as using both "standard" and "extended" typesetting modes.

I used x[2](s) as the left-hand side of the equation, which I would have expected not to matter here. Your italic x seems larger. Just for interest's sake, what did you enter it as?

acer

@Alejandro Jakubi Ok, it is sold by Maplesoft (and I edited my comment accordingly). It's still a bug in the IDE add-on if it claims that valid Maple syntax is invalid. Do you disagree?

Note that I have at no point claimed that such add-ons are de facto at fault if their behavior goes against that of the Maple product proper. In this particular case it seems to me that the described behavior of Maple is fine, and the syntax is valid.

The one accepted by Maple itself is correct.

The Maple IDE is an add-on product. This appears to be a bug in the add-on product.

acer

@Joe Riel It would be great to see such a useful package be included directly in the next major releases of Maple.

@jzivku I downloaded your linked file BioCalc.zip and unzipped. This produced a directory named BioCalc, which contained another zip file named Biocalc.zip.

Now, in Maple 18.01 on 64bit Linux, I get,

questions:=MapleTA:-Import(cat(kernelopts(homedir),"/Downloads/BioCalc/Biocalc.zip"));
Error, (in MapleTA:-Import) module does not export `questions`

What should I being doing instead, to access the questions directly in Maple 18.01 using the Grading:-Quiz command?

@Carl Love These approaches of conversion to seq (or list, or listlist then flattening) following explicit Matrix transposition can break down for large size Matrices. For example, with a 1000x1000 Matrix M with entries between 0 and 9 say, the system may take much more time and possibly even hit stack limits.

Using a single sprintf call with tailored rtable (Matrix, Vector, etc) formatting such as printf("%{ns}ld\n",M) holds up much better at larger sizes. It can also walk entries by column with a minor modification, ie, printf("%{tns}ld\n",M) to act on the data columnwise (as if transposed).

@Carl Love There is a need for better handling of oscillatory integrands taken over a semi-infinite range, or an oscillatory integrand over a finite range which can be mapped to the former. Suggestions in the past have included something like the Levin-u transform for numeric summation, possibly taking the addends as the integral  over each cycle. A quick google search reveals this hit of a feature new in Mma 8. (I've tried splitting some examples with NextZero, then using evalf/Sum, but it needs a more serious effort I'm sure.)

Also, there are some examples of complex-valued integrals which can be easily split (manually) into real and imaginary components with evalc and then fed separately to fast methods such as _d01ajc. But the system doesn't seem to handle that automatically.

 

@nm Note that without square brackets around the arguments to Vector the first argument will specify its size. So Vector(91, blah) produces a Vector with 91 entries.

First 353 354 355 356 357 358 359 Last Page 355 of 594