acer

32313 Reputation

29 Badges

19 years, 314 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@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.

@romanrieme I had already mentioned that I'd intended [F2(t), F3(t)] instead of display(F1(t), F3(t)) inside the `if`.

Your F1,F2,F3 procedures are nicely behaved and return unevaluated when passed just the symbolic name t, so that premature evaluation problems can be avoided in these examples. You can program p1 similarly.

As I mentioned earlier you could nest `if` calls, for handling more that two cases, but you could also use piecewise which becomes simpler as you load on more conditions. (You could also write a master procedure, accepting parameter t/tau, returning unevaluted for symbolic t/tau, and assembling any single frame using a single if..then..else according to the your various conditions. I won't bother.)

The following attachment shows both the nested `if` as well as the piecewise approaches I just mentioned.

Download transition_include_plot_ac.mw

note: This is not advanced programming. Several of the followup solutions involve simple logical extensions from the previous coding examples in the thread.

@zenterix You haven't explained in any way what you expected your second attempt to mean. 

@romanrieme Sorry, I was rushing out the door earlier, and my fingers didn't type what was in my mind.

What I meant was that you could use [F2(t),F3(t)] in the `if`, instead of say just F2(t).

Eg,

    animate(display, [`if`(t < 0, F1(t), [F2(t), F3(t)]), scaling = constrained],
                  t = -1 .. 1, frames = 141)

how_transition_ac3.mw

note: In your followup comment you wrote, "F1(t) from -1 to 0", but in your worksheet your F2 appears in the subsection captioned, "t from -1 to 0". In any case I feel sure you can work out which you want where.

note: I am not so keen on the following, since two back-to-back frames are displayed each with t=0.
   display([animate(F2, [t], t = -1 .. 0), animate([F1, F3], [t], t = 0 .. 1)], insequence)

note: My earlier suggestion display(F2(t),F3(t)) was a mental slip. It should be obvious why it would not work: t is just a name and F2(t) returns unevaluated which is useful elsewhere but not good for the display call. Read my correction here.

@romanrieme Just display(F2(t),F3(t)) in the `if`.

Please put your close followup queries here, instead of in a wholly separate and new Question thread. (At the very least, you could Branch off from this Question...)

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