Product Tips & Techniques

Tips and Tricks on how to get the most about Maple and MapleSim

If you're writing an external library to be called from Maple, then you have the following problem. The user wants to interrupt your code. They are valiantly pressing control-C or the stop button in the Maple GUI, as your code grinds their machine to a halt. What do you do ?

Hi everyone,

For my research, I needed a procedure to calculate an interpolant respecting the monotonicity of the given data. The curve fitting package of Maple 11 didn't help.

I'm pasting my code below.  I hope it helps some of you too.

Cheers,

Ozgur

PS: Thanks goes to Joe Riel for his help.

It's been a while since I've updated my blog, but the recent Maple 12 release gives me a good opportunity to talk about some of the features I'd been working on for the past months. A few people on MaplePrimes had asked for more details about Maple 12, so I'll start by saying a bit about the new polar axes. A lot of this work was done by my colleagues in the GUI Group and they may have additional interesting things to say about the feature.

In previous versions of Maple, you could draw polar plots using the plots[polarplot] command or with the coords=polar option, but these were always displayed with Cartesian axes. In Maple 12, polar axes are displayed by default, as seen here.

plots[polarplot](1+cos(theta), theta=0..2*Pi, axis[radial]=[tickmarks=5])

plots[polarplot](1+cos(theta), theta=0..2*Pi, axis[radial]=[tickmarks=5])

 A number of new options were added to the polarplot command so that you can customize the axes.  The most useful ones are the axis[radial] and axis[angular] options. These work like the axis[1], axis[2] and axis[3] options available for general plots, and you can use them to control color, tickmarks and other properties of the radial and angular axes.

Typeset math on plots had been introduced in Maple 11, and now we can take advantage of this with nice axis labels, in multiples of Pi, on the angular axis. These labels appear by default, but of course, they can be customized with the axis options. The plot/typesetting help page provides information on how to add typeset math to plots through the command line. There are also interactive ways to do this, using the context menu.

You can add polar axes to plots created by commands other than plots[polarplot], by using the axiscoordinates=polar option. However, not all the options offered by plots[polarplot] are available generally. Here is an example using plots[implicitplot].

plots[implicitplot]([x^2+2*y^2 = 1, x^2+1.5*y^2 = 1], color = ["Blue", "Green"], x = -1 .. 1, y = -1 .. 1, axiscoordinates = polar);

plots[implicitplot]([x^2+2*y^2 = 1, x^2+1.5*y^2 = 1], color = ["Blue", "Green"], x = -1 .. 1, y = -1 .. 1, axiscoordinates = polar)

It is also possible to get the pre-Maple 12 Cartesian axes back with polar plots, by adding the axiscoordinates=cartesian option.

Hi,

If I have boolean variable x1

And assuming multiplication means "AND" for boolean expressions;

and that addition means "OR"

Then

  x1 = x1^2 = x1^3 = ...=x1^k, k >= 1

 

Since "x1 and x1 and x1 ... and x1" = x1;

it is true if x1 is true and false if x1 is false.

 

How can a boolean expression with variables taken

to various powers be simplified?

 

I can't take credit for this; but Dave Rusin showed

We have a list of random binary numbers, say, A=[1,1,0,0,1,0]. Based upon A we want to write a matrix M=[a(i,j)] of order 5x5, where each a(i,j) is a list of length(A), comprising real numbers in closed interval [0,1]. All these reals in a(i,j) are less or equal to the corresponding entry in A.
 
Furthermore, the matrix rows and columns have to satisfy following conditions:

1. min(a(i,r),a(i,s))=[0,0,0,0,0,0] for every i,r,s such taht r<>s.
   min(a(r,j),a(s,j))=[0,0,0,0,0,0] for every i,r,s such taht r<>s.

For a bit of light relief, head on over to the online comic strip at phdcomics.com.  If you've ever been a PhD student, be careful, this strip might make the nightmares come back...

Hello,

I have problem with define external function with dll written in Visual Basic.

Declaration of function is

I was playing with a problem from the Maple NG, one can state it as
  
  Int( arccos(x) / ( 1+x^4) , x=0 .. 1)

Maple 11.02 gives a result, which numerical can not be valid.

Using real (!) partial fractions (Maple uses decomposition over the
complex, no?) I got a similar problem with denominator = parabola
(and continuity over the integration interval):

  Int( arccos(x) / (x^2 - x * 2^(1/2) + 1), x = 0 .. 1)

Some more and time-consuming consuming experiments reduces troubles
to the following example, where symbolics are disproven by numerics:

As many of you have experienced, the maplet MathMLEditor, has some problem when it comes to interpret correctly the typing functions, even some functions with the help of the palette.

I was trying to input this function : sin(4*x)+cos(2*x) but after moving form the unknown tag _XML_ error, I end up with misinterpretations of this function, to things like  4*sin(x)+cos(2*x).

So, the comments in this blog tells that the better solution is to use a TextField to get the input function, but now I face this problem

f := Get('txtFunction');
 

After fighting with the Maplet Table control, I decided to give it a try to the TextBox, using tabulator spaces, to have some degree of control over the column layout I need to present tablar results.

The problem I am facing now, is that the "\t" tabulator scape caractar on the textbox has a size to big, in some applications you can set the tab size, in number of caracters or something else, anyone know if this is possible in Maple or on  a Maplet?

  restart: interface(version); Digits:=14:

    Classic Worksheet Interface, Maple 11.02, Windows, Nov 10 2007 Build ID 330022

  Ei(1,1/2*Pi*(1+2*k)): 
  %=convert(%,Sum);
  subs(k=0,%);
  evalf(%);

                    Pi (1 + 2 k)
              Ei(1, ------------) = GAMMA(Pi k + 1/2 Pi)
                         2

                             Pi            Pi
                      Ei(1, ----) = GAMMA(----)
                             2            ...

Another interesting undocumented package in the Maple 11.02 Library.

My oldest son, Stuart, recently completed a Science Fair project on sudoku puzzles. While I am fairly good at solving sudoku puzzles, the mathematics is something that is completely outside my area of expertise. After seeing the paper by Hurzberg and Murty in the Notices of the AMS (June/July 2007) and additional papers by Felgenhauer and Jarvis (http://www.afjarvis.staff.shef.ac.uk/maths/felgenhauer_jarvis_spec1.pdf)  and Russell and Jarvis (http://www.afjarvis.staff.shef.ac.uk/maths/russell_jarvis_spec2.pdf) and Jarvis' sudoku webpage (http://www.afjarvis.staff.shef.ac.uk/sudoku/), I felt that I had a reasonable understanding of some of the basic ideas involved in counting unique sudoku puzzles. While I had nothing to add to the mathematical ideas, I did see the potential to create a tool to visualize these ideas. The result is the worksheet I just uploaded to MaplePrimes:

View 178_Sudoku3-20-03-08.mw on MapleNet or Download 178_Sudoku3-20-03-08.mw
View file details

The time for Easter eggs will soon be here.

And using LibraryTools to browse and poke about in Maple's .mla files can show a few undocumented items.

Here's one below, that's an interesting part of a package.

Can anybody tell me how to plot a family of indexed curves without having to type each one in the plot command?

View 4937_page 27.mw on MapleNet or Download 4937_page 27.mw
View file details

I'd like to see anything anybody would do differently.

First 42 43 44 45 46 47 48 Last Page 44 of 64