acer

31106 Reputation

29 Badges

19 years, 76 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@salim-barzani Your attempt,

   [abs]([s1, s2])

is not the right syntax here.

You can use the elementwise syntax,

   abs~([s1, s2])

to apply abs to both entries of the list [s1,s2].

Or you can use the map command to get the same result.

   map(abs, [s1, s2])

plot_of_2_function_of_one_type_ac.mw

@salim-barzani Here is an example. The two ways can produce the same combine result. It's your choice.

graph_in_simple_shape_acK.mw


Are you also wanting to annotate the various surfaces, in the combined plot, like with a legend for 2D plots? If that is so then you might look here.

@salim-barzani Four days ago I already showed you that you can construct a 3D combined plot of real and imaginary parts of an expression like so,

plot3d([Re, Im](s1), t = 0 .. 0.5, x = 0 .. 5, color = [red, blue])

But you've since deleted that entire Question thread, so I cannot make a working link to my Replies that contained it.

Of course, you can add other options to that call, eg.
   view = -15 .. 15, grid = [500, 500], style = surface, etc.

Note that for options such as color, style, etc, you can either use a single value which then gets applied for all the surfaces, or you can use a list of as many choices as there are surfaces. Eg, you can do either of these:

# to have all the surfaces get the same style
plot3d( [e1, e2, e3, e4], ...,
        style=surface );

# or, to get different styles for some of the surfaces,
plot3d( [e1, e2, e3, e4], ...,
        style=[surface,contour,surface,point] );


nb. In the special case of three expressions there is some ambiguity between whether those represent three different surfaces or three (x, y, and z) components of a single parametric surface. The default is to interpret a list of three expressions as denoting the parametric form. So, if you actually want three different surfaces then you also need the extra option,
  plotlist = true
For example,

plot3d( [Re, Im, abs](s1), t = 0 .. 0.5, x = 0 .. 5, 
        color = [red, blue, green],
        style = [surface, surface, point],
        plotlist = true )

Note that,
   [Re, Im, abs](s1)
is a shorter way to enter,
   [Re(s1), Im(s1), abs(s1)]


ps. You're sentences about a "template" are still opaque. You're not being clear about exactly what it is that you want.

Hi, sorry for adding this here; my link to contact a Member via message is not working.

Another Question by you (about Oct 2nd) was just deleted. I had an Answer in it relating to Explore. (I found your Explore usage followup goal -- about programmatic access to current parameter values -- so interesting that I wonder whether it might even make for a new Explore option, or at least a Help-page Example.)

Anyway, that whole Question thread has disappeared. Did you delete it, deliberately? If not, I might ask admin to reinstate it.

@Carl Love There are some chunks of right-click popup (or right-panel) menus which are purely GUI-generated.

Much of the remaining right-click popup menu items are pure GUI items, with all the items generated by the ContextMenu package appearing in the right-panel in modern versions.

The ContextMenu package is used to generate most of the menus of actions that appear in the right-panel in modern versions.

But even in the right-panel there are some items (appearing above the CM items, but below SubexpressionMenu items) which are GUI generated/related.

@salim-barzani Please don't spawn yet another Question thread on variation of the Explore use I just showed above.

Instead, you could just put your followup in a Reply here.

@Paras31 Regarding your followup query 1) immediately above, I would first observe that even for,
   plots:-odeplot(sols, [t, U[67](t)], t = 0 .. 10, color = "green")
I get a more convincing and plausible plot if I called dsolve with stepsize=0.5e-5 rather than 0.5e-4.

So I am suspicious that the results even out as far as t=100 might be inaccurate. (I find it difficult to investigate, because it's time consuming. I worry about numeric error effects, limitations of the forced method, and who knows possibly even stroboscopic mirages.)

The smaller forced stepsize has another effect; it pushes out further the time at which that "cannot compute further..." error message might be a problem. But it also makes the computation slower.

On my Maple 2024.1 on Linux I can recover some timing performance here by also passing the compile=true option to dsolve.

So, for fun, you might adjust along these lines: v1_1_1_ac1b.mw

An animation from that, which looks plausible: (This is 200 frames. at 400 frames it's even more convincing. So this seems to be reasonably accurate out at least to t=10.)

ps. There's an old joke about computing. "Speed, robustness, flexibility. Pick two." Here I worry that your situation might be, "Speed, accuracy, ability to compute. Pick one-and-a-half."

Having said that, you haven't actually stated outright 1) whether you think your results were already all accurate (I doubt it), 2) whether you're actually striving for accuracy out for large t, or not, and 3) whether you're forcing rkf45 so that it might be more sensibly compared to solvers in other software, and so on. You haven't provided much in the way of explicit requirements. (For all I know, you might be studying the "apparently chaotic" effects of accrued error here.)

@Paras31 For your query 2) it looks like your two calls to plot U[67] are not the same. The second attempt is not a repeat of the first. It uses a different range.

The first has a range that in 2D Input looks like,
   0...58
which as 2D Input parses to 0 .. 0.58
But your second has,
   0..58
which is the range from 0 to 58.

Please don't spawn yet another wholly separate Question thread on the code shown here.

If you have a followup query (such as on the performance of code given here), then you can ask about that here in a Reply.

Duplicate Question threads get flagged as such and may be deleted.

AFAIK there is no limit (outside of memory and cpu resources).

I have spawned many concurrent commandline-interface (CLI) instances, without problem, on each of Windows, Linux, and OSX.

But, might there not be an optimal number, depending say on the number of cores/(hyper)threads?

@salim-barzani It's not clear what you mean by, "parameter search automatically".

If you want to play around with the effects of the parameter values on the plot, then you could try the Explore command.

graph_in_simple_shape_acc.mw

But I don't see how "parameter search" is meaningful without an explicit goal for which you're searching. What is your goal?

It is unclear what question you might be asking.

@Paras31 It's confusing if your worksheet assign any numeric value to that name.

Your equations appear to contain the name,

   `#mover(mi("δ",fontstyle = "normal"),mo("ˆ"))`

(which pretty-prints like delta with a circumflex accent above it).

But that doesn't seem to be assigned any numeric value. Have I missed that assignment? If not, then what is its value?

5 6 7 8 9 10 11 Last Page 7 of 570