acer

32348 Reputation

29 Badges

19 years, 329 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@bliengme The worksheet I attached does illustrate how -13 is produced.

If you have a .mw Document which you can execute line-by-line and produce 26.4 directly from that evalf(h,3) call then upload it so that we can examine it. (If it is so, then it may be due to a problem related to 2D input or such.) Why wouldn't you upload it?

It makes little sense to expect anyone to be able to answer this homework question without the full details, including the geometric description of the semi-circles.

What progress have you made so far with it?

@Carl Love We can look at the internal code, ie. there is a replacement for abs done before taking derivatives, here,

showstat(((Student::Calculus1)::LimitRules)::lhopital);

That replacement for abs is weird, and goes wrong.

But would it best be repaired where it is?

Or might it be more instructive to students for Calculus1 to get an "abs" or (automatically generated) "rewrite" rule that tried to ascertain/resolve/utilize the signum of the argument to abs calls? How difficult a signum problem might students be expected to handle? Eg,

restart:
ee:=Limit((2*abs(x-2)+abs(x+1)-3)/(abs(x^2-4)+x-2),x=2,left):
with(Student:-Calculus1):
# and now, approaching x=2 from below
Rule[rewrite,abs(x-2)=2-x,abs(x+1)=x+1,abs(x^2-4)=4-x^2](ee);
ShowSolution(%);

The Limit/Diff/Int tutors need work.

@Mariusz Iwaniuk My `findroots` procedure has `guard` and `maxtries` as keyword options (keyword optional parameters).

You don't need to redefine the whole procedure just to call it with different values for those options!

Eg,

  findroots(..., guard=13)

calls it with 13 extra guard digits for every invocation of the queried function.

  findroots(..., guard=8, maxtries=75)

calls it with 8 guard digits and looks for at most 75 roots.

And when `findroots` is *called* without those options specified it will use whatever the defaults were specified when the procedure `findroots` was *defined*.  Eg,

   findroots(sin(x), -4, 4);

will use the default values.

Defining the procedure, with default values, is something you only have to do once. After that you can call it as many times as you want, with various choices of its optional parameters.

@Mariusz Iwaniuk 

They are so-called keyword options. You can supply them with custom values whenever you call the procedure, or omit them (in which case the default values are used).

I chose the defaults of guard=5 and maxtries=50 only because they seem reasonable to me. But guard::nonnegint:=0 and maxtries::posint:=1 also seem reasonable.

The purpose of that `guard` option is to strictly enforce that working precision Digits+guard is always used for evaluation of the function, regardless of which internal stage Rootfinding:-NextZero is operating (augmenting or adding to whatever its guardDigits adds).

The purpose of the `maxtries` option is to specify a finite number of roots to search for.

 

@isifesai Please post followup Replies here with additional details of your attempts to do this in Maple, rather than duplicate Questions.

@mmcdara You are very welcome.

FWIW, the idea for the template file outputleft.mw was just this: it's an empty worksheet, but with the Style for "Maple Output" forcibly set so that all output is left-jusified. There is no programmatic control (which you requested), but I considered it novel enough to mention.

@Carl Love Sorry for being unclear about the `with` call. I meant "Why do that (at all, in this code)?" rather than "What does it do?"

@Josci95 If you zip up the .csv file then you should be able to upload the .zip file here.

If the original is enormous then you could pare it down -- as long as it still exhibits the problem.

My point is that sometimes this avoids mismatches between description and the actual file. Surprises ensue. It does happen now and then. Thanks.

Upload an actual data file that exhibits the problem.

Doing so is always better than describing the data file in words.

Could the Original Poster please upload either the original "greg.csv" file, or at least another representative .csv with the same formatting  and which exhibits the same issues?

I mean the Original Poster, and and actual .csv file. It's not as useful to get a description, or a .csv file from someone else here.

Also, what's the intended purpose of the OP's code's statement,
   with(mydat);
?

 

As far as I can see this behavior goes back to Maple 6 (when the operator form of `or` was introduced?)

I suppose that it is either an oversight in the kernel builtin, or just maybe based on some corner case functionality.

But I have not thought of a useful and non-esoteric example that would rely upon it. Perhaps, something with structured types (though why not use `Or` now)? As I believe Carl alluded, it doesn't make a difference under evalb.

@danielpf The add command was introduced in Maple V Release 4 (1996).  See ?updatesR4,language

 

@Carl Love I have not had much overall joy when trying to export "array plots", whether by right-click or programmatically.

In the case of programmatic export the plot driver seems shaky (it can sometimes try and fake things by forming a single 2-D plot and adjusting the axes, but gridlines get lost and custom tickmarks act weirdly.)

It would be nice to discover whether the OP's example works out for him.

Sorry if I did not make my query clear. I'm interested in the comparative performance of this algorithm/method, implemented in Maple with various approaches to code optimzation, and in Matlab.

 

First 243 244 245 246 247 248 249 Last Page 245 of 592