18168 Reputation

29 Badges

14 years, 237 days

Social Networks and Content at

MaplePrimes Activity

These are replies submitted by acer

@J F Ogilvie 

It works in my Maple 2016.2 if I replace the definition of the frame procedure with this:

frame := proc(t)
    plots:-display(rotate(P2, Pi/2*t, [[1,1,0],[1,0,0]]),color="Green",_rest),
    plots:-display(rotate(P3, Pi/2*t, [[0,1,0],[1,1,0]]),color="Blue",_rest));
end proc:

I am not sure whether Reuben had modifed the animation play controls for playback, say for looping.

This post reminds me of something that I had been meaning to post on myself. The help page for topic plot3d,viewpoint claims in its Notes that, "The viewpoint option can only be used with a static plot and not with an animation created through the plots[display] or plots[animate] command." But this is not true, and the current case if a counter example. My experimentation indicates that a usual animation of a sequence of plots can work nicely with the viewpoint option, though it works best if the number of frames (plots) matches what the viewpoint option specifies (or has as its own default). 

@tomleslie You wrote, "inflection points are where the gradient of the function is zero - that's the first derivative, not the second as given by Kitonum."

That is wrong.

However, there is a chance that fprime_expr provided by the OP is actually the first derivative of the thing for which he is expected to obtain the inflection points.


@janhardo Why do you use Array instead of Vector and Matrix?

Upload a worksheet/document, that contains the 1D Array example that is problematic for you.

(Whenever you have any problem, upload a representative worksheet and attach it to your Question/Reply.)

@janhardo You can do this using so-called simplify with side-relations.

         {1/a+1/b+1/c=7, a+b+c=3*a*b*c});


@janhardo You are mixing up diff and D.

For an expression use the diff command. For an operator use the D command. (You accidentally tried to use D on an expression.)



proc (x) options operator, arrow; 4*sin(x^3)-x^2 end proc

ans1 := D(f3);

proc (x) options operator, arrow; 12*x^2*cos(x^3)-2*x end proc



ans2 := diff(f3(x),x);


eval(ans2, x=2.3);




Don't use the term function in the Maple context as you did above, as it's ambiguous and will confuse people. Use the term operator or procedure instead, which makes it completely clear that it is in contrast to an expression.

The Diff command provides an inert form of the diff command.

@AHSAN Your use of names is not good. You define lambda as a procedure, and then you define x as a polynomial in the name lambda. That confusion is going to cause you problems.

What is the domain over which you want your new polynomial to approximate your original rational polynomial? It may be difficult to produce such a single polynomial with 15-digit coefficients, that can approximate so closely both the domain -3..3 as well as the tails. (The numapprox package might serve better than just a polynomial fit.)

Why is a piecewise polynomial not adequate for your eventual task? You still have not informed us of where this original came from, or to what exact purposes you need to use the new approximation. Brief words don't help.

You appear to be stuck on the details of how to implement a scheme of your own devising to accomplish a goal that you won't explain. Maybe something other than your scheme could do better.

@AmirHosein Sadeghimanesh I only made one suggestion. The second thing I mentioned is something not to do.

You wrote, "I converted several 'ed variables into atomic variables."

What was the intended purpose of doing that? Was it a mistake?

Is one problem that you didn't keep a copy of the document from before you did that?

Do you intend on continuing to do that? Does that include copy&paste?

@AHSAN You didn't provide most of the details for which I asked.

I have deleted yet another duplicate of this question thread by you. Stop spamming this site with duplicates. Put your followup details here, instead of in a new Question.

@AmirHosein Sadeghimanesh 

Try this instead:


I don't recommend the following approach, using uneval quotes -- the evaluation is only delayed, and the effect is undone by inadvertant, subsequent evaluation (which makes it fragile):

plot([[0,0]], labels=[ typeset('log[10](sigma^2)'), "y" ]);

In another thread you mentioned this in relation to solving an ODE (numerically, presumably).

Why would you want a polynomial fit to that? Is it for export to use elsewhere? If a piecewise polynomial interpolant is wanted then you might be better off extracting that from the solution procedures that dsolve/numeric itself can return.

You should explain properly, clearly, and completely what you're trying to do.

(And please stop submitting multiple posts and questions for this query.)

@Lisa6 I downloaded it, followed my instructions above and appended libname with its explicit location in a string, and got the following.

What did you try? Did you use a string with the location you put it on your machine?


fn := cat(kernelopts(homedir),"/mapleprimes/convex.mla"):
#march(list, fn);



  [&<, &<=, &=, &x, _create, _el, _maximal_list, _new, _print,
   _shift, ambientdim, codim, contains, convert/PCOMPLEX,
   convert/affine, dim, flagf, flagh, fvector, genhpolynomial,
   genhvector, homology, hplanes, hvector, image, iscomplete,
   ispointed, ispolytopal, isquasipolytopal, isregular,
   issimplicial, lines, maximal, minimal, preimage, rays,
   regularpart, regularsubdiv, simplicialsubdiv,
   simplicialsubdiv/subdivide, skeleton, stellarsubdiv, support,
   traverse, traverse2]


  Convex version 1.2.0, Copyright (C) 1999-2016 Matthias Franz
  This package is distributed under the GNU General Public License
  See for more information

  [affinehull, ambientdim, arecompatible, barycenter, boundary,
   codim, contains, containsrelint, convhull, corank, corners,
   crosspolytope, cube, cyclicpolytope, delaunay, dim, directsum,
   distance, domain, dotprod, draw, dual, edges, emptypcomplex,
   emptypolyhedron, emptypolytope, facefan, faces, facets, fan,
   flagf, flagh, fullcone, fullpolyhedron, furthestdelaunay,
   fvector, genhpolynomial, genhvector, hilbertbasis, homology,
   hplanes, hspacenos, hspaces, hvector, image, incidencematrix,
   incidentfacets, incidentrays, intersection, isaffine,
   isbounded, iscomplete, iscontained, isempty, isface, isfulldim,
   islinear, ispointed, ispolytopal, isquasipolytopal, isregular,
   issimple, issimplex, issimplicial, issimplicial1, join,
   lensspace, lineality, linearhull, lines, maximal, maximum,
   minimal, minimum, minkowskisum, modz, newtonpolytope,
   normalfan, pcomplex, permutahedron, plotdata, polar, poshull,
   posorthant, pred, preimage, projspace, proximum,
   randompolytope, rank, raynos, rays, readpoly, recession,
   regularpart, regularsubdiv, relint, simplicialsubdiv, skeleton,
   stdsimplex, stellarsubdiv, succ, support, surface, torsion,
   transversalfan, traverse, traverse2, vertexnos, vertices,
   volume, voronoi, wprojspace, writepoly, zerocone, zerofan]

I don't understand why you wait until the third message to provide the link to the file. It's not very helpful.

@Lisa6 I don't understand what you're trying to say.

Is this a duplicate of your earlier question about the 3rd party package?

It's not evident what you actually tried here, with libname. What string did you use? What's in the .mla file? I won't be able to guess those things.

@Anthrazit The Units:-UseUnit facility allows the kernel session to actually generate expressions with the preferred units. Under the hood, this works by utilizing a modification of the SI system.

The units-formatting facility of the GUI allows it to customize the units (of equivalent dimension) in the prettyprinting of the expressions (regardless of which form they actually contain).

So, if you force the units-formatting facility of the GUI to utilize its notion of the SI units then that appears -- visually -- to override the effect of the Units:-UseUnit (or convert(...,units,...) expression contructions.

So you might keep units-formatting off (set to "none"), if utilizing UseUnit. Or you might possibly be able to get the kN/m effect with units-formatting alone. But it might be problematic to have the two mechanisms work together.


@Anthrazit I see two problems.

The first is a mistake on your part. You have used just the name mm for the expressions assigned to b amd h. That's not the same as Unit(mm), or what you get from the Units palette. A visual cue is that the plain name mm appears in italics, whereas the units get typeset in upright font.

The second problem rakets to so-called unit-formatting in the Document. Your Document seems to have output unit formatting set to SI as default for the sheet. That overrides the conversions I showed -- the values of the expressions is in terms of the desired kN/m but (rightly or wrongly) the GUI prettyprints it using SI default units. It works fine for me in a new Document or Worksheet, or if I toggle unit-formatting off in an output area of yours. You might choose to avoid such a blanket default for your Document (since individually changing various outputs formatting back again would of course be the tedious effort to avoid).

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