19132 Reputation

29 Badges

14 years, 288 days

Social Networks and Content at

MaplePrimes Activity

These are replies submitted by acer

You should show us what you've done so far, or describe with which details you got stuck, etc.

@mmcdara Actually, the name `` gets used reasonably often as an easy wrapping mechanism to avoid automatic simplification, especially for pretty-printing effects.

It was more common before InertForm was introduced, but it is still not very rare.

There are lots of Answers on this very forum, where it has been so used.

It is also what the ifactor command uses.

lprint( ifactor(114) );


The output of ifactor includes unevaluated calls to it, but a subsequent evaluation would reveal whatever it have been clobbered with.

Another choice of dummy name would be better, IMO.

@Liiiiz Your uploaded attachment shows combined display of whatever was assigned to p61w and p62w. But the worksheet does not assign to p61w, so as uploaded it does not produce the same results as the saved sheet.

Could you adjust that?

You should show us what lambda61 is.

You can upload and attach a worksheet using the green up-arrow in the Mapleprimes editor.


@macubear I don't know what you mean by the acronym MWE, sorry.

A bit more on terminology. You originally described something like common memory access, so I answered with something that involves combining python/C with the Maple kernel process in order to get a direct access to memory.

But you also used the terms "output" and "pipe", which seems more like a description of i/o between processes (...and in which context sockets seem to make more sense).

So I'm not really sure which you prefer (i/o or direct memory access) and what are the precise motivations.

In Maple a datatype=float[8] rtable (Array, Vector, Matrix) stores its data as double precision floats in a contiguous block of memory, so access can be direct and efficient. But OpenMaple also has facilities for conversion of other scalar numeric types (ie. back and forth between Maple and C, say).

But I know little about "direct" python<->C interaction, or C "extension" to python.

There is no unknown deltao in f, so how can you use f to make a plot of anything versus deltao?

What is delta0, which you are using as the second plotting parameter name in the implicitplot call? If it's suposed to be deltao (because, say, you didn't actually intend a "loop") then why does deltao range from 0 to 4 and delta0 from 0 to 1?

Your f has only one unknown, Y.

Your code and explanation are muddled. You should correct and explain it.

@Carl Love I'll point out that his original code did not have any local type declarations in the procedure Basenweschel, and the semicolon you've mentioned was not incorrect. It merely happened to have not accomplished anything or been necessary, originally. In his original code, it acted like a null statement.

Also, the issues you've mentioned are not the cause original problem with the code returning the same result for different calls. They are merely incidental syntax issues related to inserting explicit local declarations in one of the procedures. I realize that you, Carl, know all this, but others might not.

@Spirithaunter The command,


will print out the name of the version. You can also see it using the main menubar's Help->About Maple item. I can also now tell from your attachment that it is Maple 2016. I will adjust the header in this Question accordingly. Thank you.

It seems that the semicolon terminator in   proc(....);  before the explicit local declaration was an issue in that version. It's great if it's working better for you now. You may still need to make sure that it's computing as you expect, as I didn't look at what the full code was trying to compute.

[edit] I will add that the procedure Basenwechsel does not need to be defined as part of the body of procedure NEUZMinus. As you coded it each call to NEUZMinus will recreate procedure Basenwechsel, which is unnecessary and not most efficient. I did not bother to adjust this because I have an idea that the code could be generally improved and it does not target the original issue.

Is there some problem with uploading an attaching a worksheet that can be used to reproduce the problem? (The green up-arrow in the Mapleprimes editor can be used for that.)

Providing code-to-reproduce is much more useful than entering into a guessing game.

@Spirithaunter What is the point of stating that the location of a local declaration causes an issue in your own version of Maple without telling us what version it is?!

The code I posted can be adjusted easily to declare locals at the start of the procedures, if that was an issue for your version. That issue can be removed simply by changing the line,
   Basenwechsel:=proc(Dividend, m);
to instead be,
   Basenwechsel:=proc(Dividend, m)
since older versions (like, say, Maple 16) would reject the local declaration after the first statement terminator.

The code I posted already showed an alternate mechanism for a recursive call (procname).

There is no point in saying that you "corrected" my code without supplying what you did. How can I tell whether or not you made the same fundamental mistake as origianlly?! (You can use the green up-arrow in the Mapleprimes editor to upload and attach a worksheet. Please do so.)

I stand by my claim that your original code is confused by using the procedure's own name as an implicit local within itself as well as in a recursive call to itself.

I disagree that you should add explicit local declarations only when all else is finished and working properly. The code is already a heaving morass of print statements and obfuscated programming. Start (not finish) by correcting its structure and process.

Also, it's quite unclear how your code is supposed to work. It's entirely possible that there are other problems and coding mistakes remaining.

@janhardo I disagree with the idea the tasks in the exercises are "often" made more clear through the use of arrays.

There are lots of good programming exercises for which arrays can be an important part. But the majority of the exercises in the book are something else.

These considerations are not about memory demands or restrictions.

So, are you asking for a simple way to do only what is required by the textbook question, and to do it specifically in the Array & loop approach the authors prefer?

If not the you could use the RiemannSum command from the Student:-Calculus1 package, which can produce computational sums as well as plots of the various approximations, etc.

As with your previous Questions, I'm not sure that I see the point of your book's exercises. It doesn't seem to show the calculus details clearly or directly, as it's muffled by the longwinded programming approach. And it wasn't very effective or good Maple technique even in 2002.

Here is a relevant quote from the preface of the book you've been using (emphasis and italics by authors):

   It is appropriate to stress here that this book is NOT for learning
   how to use Maple, but rather for learning how to write and construct
   computer programs.
We expect that the general programming principles
   learned in this book will greatly help students in their programming
   courses (eg. in C, Pascal, FORTRAN) particularly in their ability to
   analyze and write complex algorithms.

Why not show us exactly what you tried.

You can upload and attach a Document or Worksheet.

Upload and attach the Document in which this occurs.

Posting an image of a Document is much less useful than posting the Document itself.

@mmcdara I am unable to download your attachment, possibly due to the choice of file name.

I have a few different and reasonably efficient ways to shade a 2D region (with a pretty smooth gradient).

But the OP did not explain what manner of shading he wanted. He mentioned a 1D domain, and I just happened to give three shadings of curves based on that domain, as well as one shaded 2D region. But we cannot as yet know what he wanted.

5 6 7 8 9 10 11 Last Page 7 of 424