acer

32333 Reputation

29 Badges

19 years, 320 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@mmcdara The OP wrote, "...I need to read the numbers on the right which belongs to this combination."

I take that as meaning something different from the need to read the row for each match of the combination, more generally.

It's less efficient to use SearchAll if only membership need testing, which might manifest at a larger size example.

Of course, we weren't informed whether the OP has other examples with duplicate occurences which are suppose to all be matched (with the rows duplicated correspondingly).

@Ronan Kitonum has kindly shown how you can utilize inert `%*` for the products of the factorials.

You wrote, "I didnt realise % made operations inert.  I haven't seen that in the help or at least I have found that."

In your original code you were trying to utilize the command NoSimpl from the InertForm package. Sorry, I got the impression that you would have read the Help pages for that package, which is why I didn't explain my use of %.

If you look at the Help page for the InertForm package you can see this as the second bullet point in its Description section,

    The inert form of an expression is a representation that avoids evaluation
    and automatic simplification by changing operators and function names
    to unassigned symbols prefixed with a % character.  For general information
    on inert functions, see
value.

Also, you are right, there is a quirk, such that the inert %factorial calls are shown as regular blue output (with bold, blue, postfix exclamation marks) regardless of whether inert=true or inert=false is passed to InertForm:-Display. I had already noticed that but didn't mention it because the inert=false does still affect whether any `%*` gets rendered in gray or blue. I suspected that you might also want the `%*`. (This quirk about %factorial is not currently mentioned in Carl's lengthy Answer.)

@mapleatha There are instructions on the Help page for the animate command,  about making the animation play.

@Pepini That's nice to see.

As mentioned before there can be some GUI sluggishness with high resolution densityplots, which was part of my motivation years ago to get better performance using images (hardware float Arrays). In some older Maple versions the Java JRE was even slower and more memory hobbled, and the Maple GUI densityplot responsiveness more severe.

The GUI does a bit better now, but FYI here's some history:

You cited an old (2019) Question in which I gave this Answer:
   https://www.mapleprimes.com/questions/226790-Is-There-Any-Maple-Code-For-The-domain#answer258068

That in turn has a link to a much older (2011) Post of mine:
   https://www.mapleprimes.com/posts/123463-ImageTools-For-Complex-argument--Plot

I wrote that partially to deal with some examples set in this (2011) Question:
   https://www.mapleprimes.com/posts/95767-Why-With-Mathematica-Not-With-Maple

And that Question cited the following (2011) article, one of whose authors wrote the book you mentioned:
   Phase Plots of Complex Functions: A Journey in Illustration

 

@Pepini You're welcome.

You can increase the resolution by passing the grid option to the plot3d command, which I showed earlier.

For example,  grid=[201,201]

Note that if you make the grid very fine then the GUI becomes sluggish upon manual rotation of the 3D plot using the mouse. In such cases it can serve one better to figure out an acceptable fixed orientation and pass that in.

@Pepini Your could adjust the following, ie. orientation of the hemispheres, direction, etc.

(The older post you last cited was more about 2D, and running in an older version. For your hemisphere examples it seems more straightforward to plot and color the 3D surfaces directly using more modern coloring options.)

restart;

f := z -> z^5 - z^4 - z + 1:

G1 := plot3d(sqrt(1-x^2-y^2), y=-sqrt(1-x^2)..sqrt(1-x^2), x=-1..1,
            colorscheme=["xyzcoloring", (x,y,z)->argument(-f(x+I*y))],
            style=surface, grid=[101,101]):

G2 := plot3d(-sqrt(1-x^2-y^2), y=-sqrt(1-x^2)..sqrt(1-x^2), x=-1..1,
            colorscheme=["xyzcoloring", (x,y,z)->argument(-f(1/(x+I*y)))],
            style=surface, grid=[101,101]):

plots:-display(G1, G2, scaling=constrained, axes=none);

 

Download col_sphere.mw

If you really want to work with the constructed image, then map the disk to a square, then project onto the hemisphere, then I suppose it could be done. But it seems more complicated.

Also, one of the purposes of using images rather than plots in those older posts was that high resolution plots (eg. 3D surface or 2D density) can stress the GUI far more. The GUI performance benefit of merely embedding images may be lost if the images are used to shade a plotted surface.

Some of the GUI performance discrepancies have lessened witth later releases, due to Java version improvements.

@Pepini This is looking more like a roundabout approach. Rather than have us guess at a projection, it might be better if you were to show the formulaic details of how those images were constructed.

What is the coordinate system, how does their shading depend on that precisely, and how does that correspond to the sphere?

@Djlogan2 The Maple GUI has some neat features as a convenient front end to (usually simpler) computations.

But for well structured work using the Maple programming language as the basis for workflow is far superior to User Interface effects. The full power of the programming language raises the product's power far above what can be done using mainly GUI effects or a fixed set of context-sensitive operations. I recommend the Programming Guide, or the inexpensive and decent Understanding Maple.

@Djlogan2 There are a variety of alternatives, if you throw Equation labels and context-panel operations into the mix.

You can also cook up some alternative syntax. For example using a customized infix operator alongside some Equation Label references (the Equation Labels are shown more nicely, right-justified in the actual Maple GUI),

restart;

`&/`:=ee->eval(ee,[_rest]):


The procedure above provides an alternative syntax for
doing the so-called 2-argument eval calls.

 

Due to the precendence rules, you may still need brackets.

a = 3*x+2*y;

a = 3*x+2*y

(1)

(1) &/ ( x=5, y=1 )

a = 17

(2)

( 4*a-2*b ) &/ (1)

12*x+8*y-2*b

(3)

(3) &/ ( x=5, y=1 )

68-2*b

(4)

 

Download shrtct_eval.mw

That helper routine's name starts with an ampersand (&), which is why it allows for an infix calling sequence. You might name it something else short that you prefer, eg. `&e`

@Carl Love I was confident that I wasn't telling you anything new. Sorry, I could have made it more clear that I was just adding a comment for the OP or other readership.

@ogunmiloro How precisely is that latest attachment different from the original? It looks as if you have accidentallu uploaded the original file again, unchanged.

The proc wrapper approach can work with an `add` call. That can make sense directly.

The `Sum` call conversion can make some sense with an implicit `evalf` acting. (I'm not a huge fan of that kind of thing.)

I don't see why that call to Maple's inert symbolic Sum should translate to that Matlab sum call. They don't directly do the same computation.

@ogunmiloro I have doubts about the correctness of what you write.

You should correct the formulas in a revised worksheet and attach it as followup.

I don't think that it should take four or five postings for you to ask your question with the details present and correct.

@ogunmiloro 

What do you mean by the numerator GAMMA in the terms like

   GAMMA/GAMMA(tau+1)

?

First 134 135 136 137 138 139 140 Last Page 136 of 591