99 Reputation

7 Badges

16 years, 51 days

MaplePrimes Activity

These are replies submitted by dpaddy


The answer to "What exactly is difficult?" is knowing what Maple thinks the offending argument is... The perfect answer (involving catch posted above) coerces Maple into revealing that argument.

Saying "those who write the original code with its embeeded error messages cannot allow for all of the dumb things which users might do" is a strawman... the perfect answer (involving catch posted above) need not and does not anticipate any specific details concerning what "users might do".


Perfect... Thanks!


I do have issues with code, and I will eventually post it in a different question in a different context; my question here is not really about that code, but instead asks how to get a meaningful error message... 

If Maple does not like something, how do I get Maple to tell me exactly what that something is about which it does not like? The error currently displayed by Maple is in many respects equivalent to

"Bits:-GetBits does not like it's first argument since Maple does not believe the first argument (whatever it may be... Maple won't display what it thinks the first argument is, because its a secret so you don't get to know) is a nonnegative integer"

How to get a meaningful message simillar to

"Error, (in Bits:-GetBits) argument 1, the number (which is 3.14), must be a nonnegative integer"

ListTools:-MakeUnique(q, 1, Equal)

After perusing more of this site I have concluded that one should not expect plot to produce a reliable graph (if you need that, use your knowledge of mathematics and programming to code your own... I'll do that in C)

After perusing more of this site I came to the conclusion that one needs to use ones mastery of mathematics and sort it out for ones self (ok, I can manage that). It would be nice, however, if the maple help entry warned the user about the extent to which the residue command cannot be expected to do the job of calculating a residue (the provided examples give the wrong impression).


You are right, convert to matrix is the answer.  I failed above because I did not capitolize Matrix.

@Axel Vogt 

I can convert to either matrix or to vector... but I do not know how to exoprt either of the results of conversion...  Perhaps export is broken?

Things are really weird...  If I type

then maple displayes a nice matrix, but

ExportMatrix("maple.txt", qq, target = auto)


Error, invalid input: ExportMatrix expects its 2nd argument, M, to be of type {Matrix, list(Matrix)}, but received qq

Moreover, if I type qq I do not get the nice matrix displayed from executing

but instead I get qq echoed back at me.

Maple complains, but I provided the wrong complaint.  Maple sez

Error, invalid input: ExportMatrix expects its 2nd argument, M, to be of type {Matrix, list(Matrix)}, but received Vector(28, {(1) = -233674.34818878854, (2) = 12.62636610207248, (3) = 0.3337043409389546e-2, (4) = 0.13303915611938133e-1, (5) = .0, (6) = .2589485687872699, (7) = 0.9341600279762804e-1, (8) = 0.3293862590239189e-1, (9) = 0.12892649003200331e-1, (10) = 0.606528143324688e-1, (11) = 0.17524827222051658e-1, (12) = -0.16059611469561555e-17, (13) = 0.621465506367271e-1, (14) = .29826235341855, (15) = -0.16288776533795546e-17, (16) = 0.15301368661023716e-1, (17) = 0.1529933711903137e-18, (18) = 0.4375115591744606e-2, (19) = 0.15201654...


@taro Can you please give (every possible) detail explaining exactly how to solve this issue (concerning how to make Maple default to the same directory as the file is located)?  I appreciate your answer, but it is much too cryptic for me to successfully make it work.


Thank you.

@vv Thanks.  For those stumbling across this...  If all discontinuities of g are due to piecewise -- admittedly a very special case --  then expressing g with Heaviside instead of piecewise will allow Maple to automatically perform the Stieltjes integration.

@vv I presume "... the integral can be reduced to a Riemann one and it is not difficult to write a Maple program to do this..." refers to what I outlined in my previous comment.  But what are the Maple functions which are avalible to assist with the automation of the decomposition (i.e., splitting into a sum of integrals)?


@vv  I appreciate the example, but what if the integrand f is not continuous and shares no discontinuities with the discontinuous function g (the floor function in your example)... When both f and g are complicated expressions involving piecewise, I am hoping that Maple can provide substancial assistance... is that the case, and in general terms how would one proceed?  I realize that by linearity the integral can be split into a sum over intervals where f is continuous, and then the method you have shown in your example would (hopefully) succeed on each piece, but how can I coerce Maple into performing at least the decomposition (i.e., splitting into a sum of integrals) for me (note: f might be a product of discontinuous functions where each factor is a complicated expression involving piecewise) ? 

More generally, this -- automating decomposition followed by automating the "by hand" method -- seems like a feasible direction to extend the capabilities of Maple if it turns out that currently Maple cannot be coerced into substancial assistance with complicated f ...  If I am not mistaken about feasibility, do you know how one goes about making that feature request to the development team?


does the job :-)

I just finished working through what happens when I massage maple's C code to work with complex and then -- since the error was horrendous -- compared that with a "write code directly in C" version based on different principles (i.e., ignore maple's approach).  The problem was to find all complex roots of a general quartic.  I have now directly experienced how helpful -- and spot on -- your advice was.

Sincere thanks.


1 2 Page 1 of 2