acer

13437 Reputation

29 Badges

11 years, 325 days

On google groups. (comp.soft-sys.math.maple and sci.math.symbolic)

On stackoverflow.

On math.stackexchange.com.

MaplePrimes Activity


These are replies submitted by acer

Which options of the command contourplot do you want to use/mimic? Is it related to coloring and shading?

@adel-00 Yes, I understood what you meant. My answer is that there is at least one other way to approximate or interpolate or fit the curve reasonably accuractely and easily.

What is the expression assigned to the name result?

@Gillee "stop watch experiments" relate to "wall clock" timing and the results from calling time[real](...) rather than calling time(...).

Your statement -- about the results from calling time(...) being incorrect because they don't match your stop watch experiments -- is wrong. You have clearly misunderstood my main point. Results from time(...) are the sum of all subthreads, including overhead, and Need Not correspond to wall clock time. If you want to compare something to your stop watch then make it the results from calling time[real](...).

I am supposing that you want a solution which is fully programatic, so that the actual plot portion has a precise size (matching that of others, say). Otherwise you could use the right-click context menu to set the plot "manipulator" and zoom and pan by hand (thus creating the extra space for the well-placed annotation).

It might be possible to set up an easy-to-use procedure to do that fully programatically using the
DocumentTools:-Layout:-InlinePlot command.

I'll try and do that when I get computer access, perhaps this evening.

The idea is to increase the (viewport/bounding box) while zooming-out (scaling) by a corresponding factor so as the keep the actual plot size fixed. Then the plot could be positioned within the box by offsets (pan). If I recall the DocumentTools stuff allows these bits to be programmed.

I'll let you know if it works well for me, unless someone else codes it up first.

update: It turns out that I was mistakenly thinking of the way that zoom and pan works for 3D plots. I don't see how the above could be used for 2D plots, in which even manual zoom and pan affects the axis view. The suggestion to annotate by using plots:-textplot (which can be used to insert typeset math as well as text) seems like it may be the only simple approach.

@Christopher2222 I was going to have a look tonight (for a FromInert/ToInert try).

@Rouben Rostamian  The difficulty you cite is due to the colored replacement (here) not being a name, that's true. But it's due to it being a function call, rather than a string.

Typesetting:-mo (or mi, mn, etc) can be useful for purely display purposes. But so-called TypeMK atomic identifiers (as names proper) can sometimes provide a closer match in type to a given name.

It's a shame that after more than a decade these mechanisms of 2D typesetting are still under-documented.

@Kitonum Thanks. An improvement would be to handle differently any name which was already an atomic identifier in TypeMK form (so as to inject a mathcolor into it, or replace such).

But that case is more rare. It may be adequate to the OP to handle double-underscore "atomic" subscripted names, which the above code demonstrates.

Of course, other marked up atomic identifiers (e.g. names with overdot, circumflex, etc, as from the Layout palette) can also be colored via the main menubar. And then assignment can be made, as above. Such colored names could made with the mouse rather than programatically, which I suspect is what Robert Lopez's Answer alludes to.

The mechanism by which NumericEventHandler works is supposed to be local to the execution of a procedure, thereby providing local context analogous to environment variables.

Can you show a complete example (and result) where that is inadequate or works otherwise?

Did you try Student:-Precalculus:-CompleteSquare ?

e:= x^2+y^2-8*x-12*y-92:

Student:-Precalculus:-CompleteSquare(e, [x,y]);

                  2          2
           (y - 6)  + (x - 4)  - 144

@Markiyan Hirnyk How did you come up with the number 9? It's used as an input to Mma's DominantColors command, in your screenshot. What led to the choice of 9?

@kuwait1 No, yy is not a pair (system) of differential equations. That's the whole point of the earlier replies.

Change the colon to a semicolon and you'll see how.

Don't forget that f(x,y) has been assigned a value of x*y .

[Silly clarification question by me deleted.]

Obtaining a specific number of reduced colors is an interesting problem.

@Adam Ledger Thanks for that. The situation seems similar to my conjecture. I will submit a bug report.

Do you have any conditions on i and j (ie. integers, positive, odd or even, etc)? Have you considered that for your particular restrictions on i and j the equation might always hold and, if so, then might it be that your unstated goal is to verify that?

FWIW, here is a (somewhat) related problem arising from `solve`,

restart;

ee:=(-sin((2*Pi*i-Pi)/(2*i-j))-sin((Pi*j-Pi)/(2*i-j))
    -sin(2*Pi*i/(2*i-j))-sin(Pi*j/(2*i-j)))/(2+2*cos(Pi/(2*i-j)));

(-sin((2*Pi*i-Pi)/(2*i-j))-sin((Pi*j-Pi)/(2*i-j))-sin(2*Pi*i/(2*i-j))-sin(Pi*j/(2*i-j)))/(2+2*cos(Pi/(2*i-j)))

solve(ee,i);

Error, (in RootOf) expression independent of, _Z

solve(ee,{i,j});

Error, (in RootOf) expression independent of, _Z

 

Download AL.mw

 

 

@Adam Ledger Names like _S000100 can be generated by the procedures called internally by the solve command. (It uses such names as placeholders for expressions with certain conditions upon them.) Offhand it sounds like solve (or its internals, such as within SolveTools) may have encountered an unexpected situation which it was unable to handle.

If you can provide sample code that reproduces the error message then we might be able to offer some concrete suggestion, or confirm it as a bug.

1 2 3 4 5 6 7 Last Page 1 of 315