acer

32333 Reputation

29 Badges

19 years, 322 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@Joe Riel That's nice. Vote up.

But perhaps its ModuleLoad's conditional statement should test
   if catchall=true ... then
instead of just
   if catchall ... then
As written, that might be neither true nor false, if Catch has not been called but the package loaded, resulting in a runtime error.

And does Clear or similar always need to be used before Caught can be retried with an earlier argument, or else risk a false positive?

Also (quibble?, not sure) could/should,
  print('INTERFACE_WARN'(...)
be,
  streamcall('INTERFACE_WARN'(...)
 

Your approach reminds me of a module I once wrote to redirect voluminous userinfo messages to a TextBox/TextArea.

There is no "method RK45" as you typed it.

There is a method rkf45, for which Carl has given you an answer in the case of a procedure return by dsolve. (There is also a possible array-style return from dsolve, but I'm not sure whether you'd find the relevent dsolve internals directly useful.)

There is also a classical submethod rk4, for which from within dsolve you can see a portion as the meth=4 case as shown in,
    showstat(`dsolve/numeric/classical`)

Warnings are not directly programatically trappable by try..catch or traperror.

The warning you mention is made by a Maple library procedure: an internal of the Optimization package. That procedure gets an error code back from an external call to a compiled C function (NAG library), and in this case it means the numeric situation described.

By having your own procedure which makes the external-calling you could programmatically receive the info return-value and make your own next decisions. If you wanted I could show you how the external call could be made for your given example.

One kludgy alternative might be (on the fly) to replace the key Optimization internal procedure with a close duplicate -- whose difference is that it assigns the externally received info value to a Maple global variable which could be tested programatically.

If any of this seems worthwhile attempting to you, then please say which. (I'm pretty busy but it might be short...)

@zenterix There is a page with a form, linked the "Submit Software Change Request" item in the "More" drop-menu near the top on the Mapleprimes page.

I already submitted it, for that current directory/libname documentation issue.

@zenterix The current directory (or ".", to be more precise) is no longer automatically added to libname.

That changed between Maple 2015.2 and Maple 2016.

IMO it was a mistake to ever have it that way. Any errant .m or .mla could cause mysterious behavior.

The phrase "as well as your current directory" in the note in subsection Custom Libraries of section 11.3 of the Programming Guide is out-of-date, I suspect. I shall file a bug report.

@PaulNewton There is a command pointplot in the plots package.

You could do any of these:
1) call it using its full name plots:-pointplot(...)
2) load the whole package first.
      with(plots):
      pointplot(...);

3) load just that command first,
      with(plots,pointplot):
      pointplot(...);

Your uploaded Worksheet has the command with(plots) near its beginning.

@PaulNewton In the numerator of the rhs of the statement that assigns to expr1 you are missing a multiplication sign between V__a and the opening bracket.

In consequence, it parses as a function application V__a(...) instead of V__a*(...) . Then the solve call in getSol (when passed 0 for z) returns NULL, and rhs receives invalid input.

[edit] If you remove the full colon terminator from the statement that assigns to expr1 in your original Worksheet then you could cut&paste the right-hand-side of the pretty-printed ouput, as 2D Input in your new Document. (Of course, you also changed from capticalized C__a,C__b to c__a,c__b so you'd need to accomodate the change.)

@PaulNewton Yes, using the green up-arrow popup in Mapleprimes, you need to use the inert-link item following uploading the file. (Currently the other manual item to insert/inline the .mw file into Mapleprimes -- so that it also displays in full here -- is not working.)

ps. Maple's .mw files are stored in an XML format. A Maple program can manipulate that. So a file with plain (red cursor) Execution Groups could be programmatically rewritten into a new file as Document Blocks -- but it'd take a bit of effort as there are a few tricky aspects, eg. 1) distinguishing between those Execution Groups and the ones already part of Document Blocks, 2) generating valid reference numbers (which serve an internal purpose), etc.

Does your account have write-access permission in that directory?

note: I think that using a personal .mla file in Maple's own installation's lib folder is a bad idea -- even if you sorted out this issue.

@DJJerome1976 I didn't intend any offense, and sorry if I expressed it poorly.

What I meant was that the target expression you mentioned is not equal to the explicit result from dsolve for all values of t (...if done without assumptions). You didn't bring that up in your Question.

I showed one formulation (with a simplification ignoring branch distinctions) that had just a single radical -- one aspect that you mentioned wanting.

@tomleslie The OP wrote, "I try to find the value of the highest peak..."

There appear to be no other local maxima in the ranges x=-5..5,t=-5..5 that the OP used for plotting, except along the boundaries x=-5 and x=5 (and those are part of ridges, not peaks).

The likeliest explanation may be that the OP was misled by the apparently finite heights of the peaks in the plot -- a consequence of plot3d's sampling methodology.

@mmcdara This person has been posting short questions here (many puzzle-like) for over ten years. It doesn't seem like homework. There are a few regular submitters of math problems here who appear to be motivated by interest alone.

@emersondiaz You're very welcome.

I've just updated the download link in my previous Reply.

It should now run quite a bit faster.

I also removed the global, and typeset the Greek letters.

@emersondiaz Before I was simply fixing up the Maple code that you provided in your .mw attachment, w.r.t. how you could use NLPSolve's results to get numeric values. I wasn't even looking at the Matlab code in the .pdf file.

Here is a different translation of that Matlab code in your .pdf file, and a plot that obtains:

4.6_acccc.mw

By the way, in your .pdf file the Matlab code uses an integrand like,

    sqrt(x)/(exp((x - y)/t) + 1)

But in your Maple code in this Question you appear to have used something like a polylog form with for integrand more like,

     sqrt(x)/(exp(x - y)/t + 1)

Those two expressions are not the same; the bracketing in the denominators are importantly different. That is why the earlier plot wasn't correct.

@zenterix For unassigned names i and x there's no important difference here between,

   plot(x, x=1..5)

and,

   plot(i, i=1..5)

There's no implicit type aspect where the name `i` is integer valued and `x` is continuously valued. They're both just names.

First 89 90 91 92 93 94 95 Last Page 91 of 591