MaplePrimes Questions

I would like to export-to-file a list containing equations, variables, and constants, e.g.

xyz := [dx = x*y-(1/3)*(y-z), dy = -0.01*x, dz = z/10];
I have used fprintf to write to a file. The closest I got to what I want is by doing:
fd := fopen("xyz.m", WRITE) :
fprintf( fd, %s,  CodeGeneration[Matlab](xyz,'output'=string) ):
fclose(fd) :

Using CodeGeneration[Matlab] was the only way I found to export a list like xyz above, simply writing fprintf...

Dear Maple Team,

     I found a very strange thing in my Maple 14: When I typed the two command line as follows:sum(n^4, n); expand(sum(i^4, i = 1 .. n)), the results are not the same. Now I copy them here.

                   1  5   1  4   1  3   1  

I am having trouble understanding how to put different tickmark spacing on the x and y axes.  Would someone be kind enough to show me the syntax of a plot command which plots the function y=x from x=-1..1 with tickmarks spaced 0.25 apart on the x-axis and 0.2 apart on the y-axis?


Thank you

The question is to use a program of modified newton raphson , incorporating the Romberg intergal procedure which i have already created, to create a new program which evaluates the integral f(alpha) = 1-10*int(tan(x)^alpha),from 0 to Pi/4.
The following needs to be incorporated in your program:

-Let ci be the approximation of alpha* on iterate i of your "modified newton raphson" method, then the program should run until:

I have defined a function as follows:


and now i need to plot this function to see where the root lies, i have tried to do this using the following command:


and i have tried putting in boundaries but it doesnt seem to work. Can anyone help me please. 


As a piece of work, I am required to define a function, and plot it in 3d.

The problem is regarding the 'gamma' function. We have to define it as:

myGamma:= x->int(exp(-t)*t^(x-1),t=0..infinity);

Then a later part of the questions asks you to define phi as the following function:


How may I program the following with Maple?


(1) Define the function:

H(p) := p * c1 + p^2 * c2 + p^3 * c3  + ......


(2) Now construct the following expression:


(1-p) [ v''' + 1 ]  = H(p) [ v''' - 25 * v' + 1]

Here, v is some funciton of x.


(3) Now assume: v = u0 + u1 * p + u2 * p^2 + ...

and substitute this into the expression defined at the point (2).


sys_ode := diff(lambda[1](t), t) = lambda[2](t)+sin(t), diff(lambda[2](t), t) = lambda[1](t)+cos(t)



at first I have to admit, that I'm totaly new to maple and have only few experience with the programm.


That's the problem. I've got an old maple-code which I want to rewrite in the 2d-Math-syntax. In the code there are a lot of variables of the type "numerical integer" with a form like




--> with index in the name

It's a code for a physical-/chemical- process so the...

This worksheet is created with Maple 14, which works fine. Running it in Maple 15 I got a message "Connection to kernel is lost" or something the like (the message was in Chinese). I am under Mac OSX and the worksheet makes use of the grtensor ii package freely available on the net.  Any assist please?

Hello, I'm Tam and I had a problem with Conditional of Jacobi Iteration.

So, the proplem is:




And I want to check the condition

with the maple program.

Fisrt, I typed

b:=sum(abs('A'[1,j]),j=1..ColumnDimension(A)); and I got b:=7


Im trying to evaluate a Transfer function from a block diagram.

i have written all the equations but i cant find the command to find the symbolic solution

of theta_l/Theta_d in terms of A,B,C,s,Kp,Kv


attched is the maple file.

i use maple 13.






For a face recognition program I need to import all the jpg files that are in a map
on the hard drive. I can already do this by f(i):=Read("C:xxx\\xx\\xxx\\xxx.jpg"); 
that gives f(i) a single jpg file.
But this requires every file to be imported separately. Is there a way to import all the jpg
files from that map?
e.g. f:=Read("...\\*.jpg"); that would give f a list of all the jpg files in the map.


Suppose that I wanted to produce a 2D plot which was coloured in the region between two functions.

I mean not just between two curves, but between two functions. I would like to make the curves appear as smooth as Maple knows how, but without getting any jaggedness due to using a high grid in an implicitpot.

Consider this example. These two curves are displayed as being quite smooth (using adaptive plotting or whatever `plot` knows to use). How best can the regions between these two curves be filled, without having to recourse perhaps to a rough implicit plot?

plot([x^2-1, -x-1], x=-1.5..1.5, y=-1.5..1.5, color=black);

A simple trick with a product provides a defined implicit region that `implicitplot` can handle. But there can be small gaps, or irregularities, because the formulas for the curves are being solved in a complicated way and no longer being used as mere functions.

plots:-implicitplot( (y - (x^2-1))*(y - (-x-1)),
                     x=-1.5..1.5, y=-1.5..1.5,
                     filledregions=true, gridrefine=4,
                     axes=boxed, labels=["x","y"],
                     view=[-1.5..1.5,-1.5..1.5] );

Another technique is to overlay two simpler implicit plots, colouring and layering them carefully so as to give the impression that only the inner regions had been coloured. The problem here is that the intersections all have to be computed and the problem split up piecemeal (which I did not do) so that the layered colouring is adjusted to whichever curve lies on top. Without that care, then something like this happens, with odd subregions appearing uncoloured.

   plots:-implicitplot( x^2-1 >= y, x=-1.5..1.5, y=-1.5..1.5,
                        filledregions=true, gridrefine=4,
                        coloring=["white","white"] ),
   plots:-implicitplot( -x-1 >= y, x=-1.5..1.5, y=-1.5..1.5,
                        filledregions=true, gridrefine=2,
                        coloring=[COLOUR(RGB,.8,.8,.9),"white"] ),
               axes=boxed, labels=["x","y"], view=[-1.5..1.5,-1.5..1.5]);

Did I miss something obvious? Is there some other calling sequence or command that makes this much easier (and smoother, by default)?

I want to have a Plot component display animations, controlled by a button. I want each click
of the button to show a new animation.

So e.g. the Action when Clicked for the button might be something like this (for animations alternately in blue and red):

use DocumentTools, plots in

if cc = red then cc:= blue else cc:= red fi;
Do(%Plot0 =animate(plot,[sin(x+t),t=0..Pi,colour=cc],x=0..Pi,frames=4));

First 768 769 770 771 772 773 774 Last Page 770 of 1408