pchin

Dr. Paulina Chin

1291 Reputation

12 Badges

17 years, 21 days
Maplesoft
Senior Architect
Waterloo, Ontario, Canada

MaplePrimes Activity


These are replies submitted by pchin

Acer, I can reproduce that error on Linux. I'll record this bug in our database and we'll investigate. Thanks for catching this.

Paulina

I am unable to reproduce the error you are getting. Instead, I get the expected solution by increasing depthlimit.

However, I wouldn't assume right away that the problem is with your computer, although using a different system can have an effect. Most of the algorithms in the Optimization package are sensitive to floating-point errors and to the choice of initial point. That is just a fact of life with many numerical local optimization solvers. Occasionally, you'll get an unexpected error with these routines but more frequently, you might get a local minimum different from what you expect.

For this particular example, try using a different initial point and see if that helps to avoid the error. Indeed, with routines in the Optimization package, one should always provide an initial point if at all possible. You can also set infolevel[Optimization] to a value of 3 or higher to get some information about what is happening.

Paulina Chin
Maplesoft

 

As Alec points out, when you plot a function (an expression in Maple), that function is sampled over the given range. The values computed at those sample points are then connected. You can provide the 'discont' option, and the plot command will try to avoid connecting points over discontinuities. However, removable discontinuities are ignored, as stated on the plot/options help page under 'discont'. Nevertheless, you can create a plot showing the discontinuity by using the pointplot command to draw a circle, as Alec shows in his post.

I'd also recommend that you look at some of the interactive tutors available with the Student packages. Go to the Tools Menu and choose Tutors, to get started. These may not generate the exact plot you're looking for, but they may be helpful in understanding the properties of the function you're investigating.

Paulina Chin
Maplesoft

Congratulations to both of you, Acer and Alejandro. Well deserved!

Paulina

Robert is correct. Even in the Standard Interface, you can get the numerical "staircase" effect in plots if you try hard enough. Avoiding this usually involves some reformulation of the problem. For example, you can increase Digits and plot -10*x^5 instead of 1-10*x^5 (using Robert's example), and then use custom labels for the axes tickmarks. I acknowledge that this is not ideal, as it involves some work for the user, but it is usually possible to get a reasonable plot with some effort. At the moment, Maple does not have an automatic way of dealing with such problems.

However, I would urge users who are plotting with the Classic Interface to give the Standard Interface a try. I understand that some users really do need to stick with the Classic Interface for various reasons, but the performance of plots in the Standard Interface has been improving steadily since Maple 9. In Maple 11, my colleagues in the GUI Group made substantial improvements to the performance of 2-D plots, and we are working on more improvements to plotting for future releases.

I myself find it relatively easy to execute a large number of plots in Maple 12. There are also so many really useful plotting features in the Standard Interface: gridlines, transparency, typesetting, true array plots, polar axes, etc. If you're still using Classic, I do hope you'll at least try executing a few plots in Standard. You may be pleasantly surprised.

Paulina Chin
Maplesoft

Yes, I can see how the tooltip `A[n]` might be confusing. I'll record this weakness in our bugs database. As for the colours, these are the default colours for the palette template. After you insert the item, you can tab through the placeholders and replace the entries with expressions of your choice. The name does not get generated until after you execute the input line.

Paulina

For (3), you can also use the Layout palette. It contains two entries for an expression with a subscript. The first generates the indexed form and the other results in an atomic identifier.

Paulina Chin
Maplesoft

Hi Tyler,

Almost everything I've written can be found in our help system, on various help pages. However, I do acknowledge that it can be difficult for beginning users to find these pages and that many of our example worksheets should be updated to show the newer features. We are most certainly in the process of doing that. If you get a chance to try Maple 12, you'll see much greater use of 2d math in our help pages and additional sample worksheets and documents.

You write, "I can understand that providing these types of solutions in blog entries is the quickest way to disseminate the knowledge to a wide user-base, but this really should be in the product documentation." It is indeed our goal to eventually get the most useful material from the blog posts into our product documentation. The blog posts are not meant to be a replacement for product documentation, but as you point out, they are useful for providing information quickly and I like the fact that I can respond to follow-up questions and comments easily.

Paulina

Hi Tyler,

I hope I'm not misinterpreting your question, but it should be relatively easy in Maple to get the result you need. Typeset math for titles, axes labels, etc., is available for plots in Maple 11. Look at the help page for plot/typesetting. For example, to get Sine(sigma) in the title, just enter plot(sin(sigma), sigma=0..2*Pi, title=Sine(sigma)).

I'm assuming you're using the Standard worksheet interface with 2-D math input. If you're not, that might be why you're having difficulties. It is possible to use 1-D math input with the Standard interface to get typeset math in plots, but you have to jump through a few more hoops. With 2-D math input, you can also select Greek letters and mathematical expressions from the palettes to create plot titles and labels.

You might find this blog entry on captions helpful.

Paulina Chin
Maplesoft

Edwin writes: "I did look at the palette "Diacritical Marks", but couldn't figure out how to use it to put an accent over a letter. "

Another way to get an umlaut over a letter is to use the Accents palette and choose the 'DotOver' entry (the 'A' with two dots over it). You'll have to select the expression and convert to an atomic identifier via the context menu so that it doesn't parse as a derivative.

To get one expression placed on top of the other, you can use the entries in the Layout palette (the ones with the 'A' on top of the 'B'). However, because these are general templates, they do leave that undesirable gap between the umlaut and the letter, as Alec had observed.

Paulina Chin
Maplesoft

 

Edwin writes: "I did look at the palette "Diacritical Marks", but couldn't figure out how to use it to put an accent over a letter. "

Another way to get an umlaut over a letter is to use the Accents palette and choose the 'DotOver' entry (the 'A' with two dots over it). You'll have to select the expression and convert to an atomic identifier via the context menu so that it doesn't parse as a derivative.

To get one expression placed on top of the other, you can use the entries in the Layout palette (the ones with the 'A' on top of the 'B'). However, because these are general templates, they do leave that undesirable gap between the umlaut and the letter, as Alec had observed.

Paulina Chin
Maplesoft

 

Alec writes: "I just tried Paulina's suggestion for using more than one parameter, and it worked."

Well, it was more of an observation than a suggestion. By all means, use it if it works, but we do intend to fix the bug. :-)

Actually, Robert's suggestion to use proc()...end proc instead of an arrow procedure is a good one, as it's less cryptic to anyone else reading your worksheet.

Paulina

 

 

Alec writes: "I just tried Paulina's suggestion for using more than one parameter, and it worked."

Well, it was more of an observation than a suggestion. By all means, use it if it works, but we do intend to fix the bug. :-)

Actually, Robert's suggestion to use proc()...end proc instead of an arrow procedure is a good one, as it's less cryptic to anyone else reading your worksheet.

Paulina

 

 

After re-reading the inline help page myself, I see that it lacks an explanation of why one would want to use the inline option. I've recorded this weakness in our bugs database and I expect that it'll be addressed for a future Maple release.

In the meantime, you can look at our Introductory Programming Guide, which is available for download here. The description on p. 209 says, "An inline Maple procedure avoids the overhead of a procedure call by executing the Maple instructions directly, as if it were written inline, rather than in a separate procedure. By avoiding the overhead of the procedure call, small performance improvements can be achieved."

Paulina Chin
Maplesoft

After re-reading the inline help page myself, I see that it lacks an explanation of why one would want to use the inline option. I've recorded this weakness in our bugs database and I expect that it'll be addressed for a future Maple release.

In the meantime, you can look at our Introductory Programming Guide, which is available for download here. The description on p. 209 says, "An inline Maple procedure avoids the overhead of a procedure call by executing the Maple instructions directly, as if it were written inline, rather than in a separate procedure. By avoiding the overhead of the procedure call, small performance improvements can be achieved."

Paulina Chin
Maplesoft

3 4 5 6 7 8 Page 5 of 8