acer

32490 Reputation

29 Badges

20 years, 7 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@Maple_lover1 The reworking of the mechanisms to allow the old table=based orthopoly package to be used more like a module-based package is somewhat goofy. But then, so are table-based packages themseleves.

You could experiment with it done as follows:

FunctionC:=proc(k,M) local K,n,m,x;
uses O=orthopoly: 
    K:=2^(k-1);

    unapply(piecewise((n-1)/K <= x and x <= n/K,
            2^((k+1)/2)/sqrt(Pi)*O['':-H''](m,2^(k)*x-2*n+1), 0),
            [n,m,x])
  end proc:

Have a look at the output from a call like, say, FunctionC(3) and test it. (You may wish to stress-test against possibilities of the variable name H being previously assigned.) I don't much care for the procedure generated by the call orthopoly:-H(m,...) where m is an unassigned name.

There's no real difference between between w:=(x)->1; and w:=x->1; except for source tidiness and legibility.

I prefer to pass the independent variable names into unapply in a list, for clarity and legibility. I don't care for passing them as an unadorned sequence -- partially because unapply can also take some other option(s). If one's code has so many unapply calls that garbage collection of the extra list is even noticeable -- or if that list of variables is huge -- then there are surely far more other serious programming difficulties to handle.

@jrive I had replaced the link in the Reply/Comment above (to the worksheet with its name ending in "3").

@jrive I added some variants. With the radicals "frozen" they become temporary names, thus allowing algsubs or simplify-with-side-relations to operate.

@jrive Here are a few ways to get that, using algsubs with the radicals frozen.

The first way uses frontend, and the second uses freeze/thaw. The second of those can also utilize simplify-with-side-relations rather than algsubs.

new_filter_solution_ac3.mw

@love-algebra Do you think that an explicit, exact, closed form solution exists, in the general case that a root other than t=0 exists?

How about a "black box" procedure that can take numeric values for parameters and return a numeric value for `t` (if such then exists...)?

What were you planning on doing with an explicit, exact symbolic answer?

@Carl Love I have edited the Answer and changed it from
  `%.`(A,b)
to
  A %. b
which is nicer, thanks.

(The precedence doesn't affect this example -- as it is -- even in Maple 2017.2.)

@vroomZOOM You have not informed Maple of the units of time that t would take. (In your mind the quantities might be in seconds, but it doesn't have to be so merely from what you coded so far, and hence Maple cannot sensibly guess it -- guessing it would be wrong.)

You can supply units of time in the range of the plot command, or in the formulas where t appears, but you ought to double check other aspects of the results.

@mmcdara There are several examples using last (and initial and method) on the Help page for Topic dsolve,numeric,IVP .

As I showed, you could supply just one, inverted "view" to odeplot, or you could supply several "views". As shown, if you supply just the one inverted arrangement then the axis labels correspond and are as expected. If you supply multiple "views" and the axes serve differing purposes then the axis labels illustrate that fact. Of course you can always explicitly specifiy the axes labels.

 

@Carl Love Yes, thanks, I hadn't noticed that the Question was marked Maple 2020. The infix form should work in 1D input in versions from Maple 2017 onward.

How about uploading a worksheet that contains the various definitions? (Green up-arrow in Mapleprimes editor.)

@emendes I don't understand what you mean  sorry.

You two methods may not produce results which are always equivalent for all values of the parameters (despite your hope or expectation, though they might be Top Secret because you didnt share them...). How do you expect or hope to deal with that situation?

Perhaps there is something about your (undisclosed) solving methods which might allow you to generate programmatically or know some sufficient assumptions.

@jalal By itself the %diff gets rendered in gray (a visual indication that it is inert).

The call,

    InertForm:-Display(...,inert=false)

makes it render in black, rather than gray.

I think that this is much better than using uneval quotes to get a similar effect, which is more fragile.

(It also adds a little protection against the very unlikely event that the plotting structure gets affected by some `value` call, which the `typeset` doesn't.)

Please put your implicitplot example (in full, defining the argument) here.

@Anthrazit Unevaluated function calls are legitimately used very often in Maple.

Just one example -- amongst many -- would be y(x) in in the context of a derivative or a differential equation.

Please don't post duplicate Questions concerning this same issue.

Put follow up details here, rather than split the topic with a separate Question thread.

You won't be able to deal properly with indexed references within a Compiled procedure unless you pass in an appropriate Array/Matrix/Vector.

First 152 153 154 155 156 157 158 Last Page 154 of 594