Items tagged with list list Tagged Items Feed

Dear friends,


I am trying to do an integration which consists of a list of data; let me explain it more:

I have to do

however, I do not have f(x) in the form of a function. f(x) is a list which is:

also, I have x as

How can I do the integration between 1<x<6 ?





though swap can do this,

hope to know a simple way to shift a list or set to the left in cycle in maple

for example




So basic problem.


I want to create a list with undetermined size. I have some data, let's say these data objects are numbers for now (they can be expressions of variables, or even equations)


Here is a pseudocode,


for n=1:10

  list(n) = n+1;



So the above for loop will create a list of size 9, with objects being number 2 through 11.


I want the list to be in {} form


Now I awnt to take this further. Let's say my data objects aren't just numbers, but expressions. How would I create a list of expressions and turning them into an equation?




e1 := a^2 + b

e2 := b + a*b


e3:= b*a + a*b^2




for i = 1:3 do

list(i) = ei ~=0;



Output should look like


list = {a^2 + b = 0, b + a*b=0,b*a + a*b^2=0}


Notice the use of curly braces


Hi, i got a litlle problem with fromats, i m realy bad at this.
i got procedure 'getone(z::list)' i was execute it like this  
>getone([seq(lineP[i], i = 1 .. pm)]::list)
where lineP is 

>pm := 3;
>rollx := rand(98.0 .. 102.0); rolly := rand(-1.0 .. 5);
>rolll := rand(.5 .. 1.0); rollf := rand(0. .. evalf(2*Pi));
>rollm := rand(0. .. 20.0);

>for i to pm do lineP[i] := [rollx(), rolly(), rolll(), rollf(), rollm()] end do;

it's pm times of z:=[rollx(), rolly(), rolll(), rollf(), rollm()] ::list

and i need make optimization work for any pm=1..100; with rabdomly generated iteration point as above.

The main queston is how make minimize as below
Minimize(z,variables=[z],   initialpoint={z=[seq(lineP[i], i = 1 .. pm)]},iterationlimit=1000,optimalitytolerance=0.01)

work with z::list kind of 

[[100.7798614, 1.109653266, 0.9840371500, 4.257816686, 9.737110573][100.0135459, 0.887539481, 0.9144164697, 3.980093624, 7.343851161][100.0661308, 3.724268229, 0.5020544909, 2.052134822, 14.37408543]]

The member function can provide the position of x in table/list s for the first variable




will provide p=1


If I would like to know the position of all a, [1,4,5], is there any simple way to obtain them? I can do something like



for i from 1 to 5 do

 if f[i]='a' then



 end if;

end do;


something like that

Thank you very much

how to merge two lists without repetitions?

input [x,y,z] [a,b,x]

return [x,y,z,a,b]

Greetings to all,

I want to make a "circular" list but I cannot find a way.

To be more precise, let K=[x1,x2,x3,x4], is any way to set K[0]:=K[4] and K[5]:=K[1]?


Thanx a lot,


Given a polynomial expression I would like to obtain a list whose entries are the positive entries of the polynomial with multiplicity given by the coefficients:


Given the polynomial expression: p:=x^2*y-2*y*z+3*x^2+2*y-z

The positive terms are: x^2*y, 3*x^2, 2*y

Thus I would like to obtain the list L:=[x^2*y , x^2 , x^2 , x^2, y , y].

Notice x^2*y appears once since the coefficient is 1.

x^2 appears three times since the coefficient is 3.

y appears two times since the coefficient is 2.







Given a list of numbers, is there a command that returns the list whose entries are the absolute values of the original list? is there also one from the signum?

Ex: Given L:=[1,-1,-5,2,-3], I would like to obtain for the absolute value [1,1,5,2,3] and for the signum [1,-1,-1,1,-1].

Given a list I would like to find the position of the positive numbers. Ex: Given L:=[3,8,-5,1,-3,-7], I would like to have as a result P:=[1,2,4].

I want to avoid using a loop for this. Any suggestion?

I want to paste a list of points generated by another program into a maple worksheet. 

However, when I paste the list of points into the Maple worksheet, I get a command prompt after each defined point in the list.  Whereby, the executable code will not run.

I need a way to paste the list of points into the worksheet without any command prompts.  Is there a special entry mode?  


Here's the list of points I want to paste into the worksheet:










Below is the worksheet code that I want to paste the list of points.

However, when I paste the list of points within the "pointPlot3D" function -- I get a command prompt after each defined point in the list of points.  (So 30 points gives 30 command prompts.)  Whereby, when this code is executed, there is an error.    What I need is a means to paste this list of points into the worksheet WITHOUT the command prompts showing up. 


> with(geom3d):

> with(plots):

> sphere1:=(x,y,z,R)->[x+R*cos(phi)*cos(theta),y+R*cos(phi)*sin(theta),z+R*sin(phi)]:

> Explore(display(        


               scaling = constrained, axes = boxed, style=wireframe, labels=[x,y,z],                


> [
> [20,0,0],
> [20,4,0],
> [19,8,0],
> [17,11,0],
> [14,14,0],
> [11,17,0]

> ],

               symbol=circle,symbolsize=10)  ),        

       parameters=[Rp=3..20],         initialvalues=[Rp=20] );


I have a list L:={1,2,3,4,5,6,7,8}. I choose three elements from list L. How many different combinations of three numbers can be selected from L so that the numbers could represent the side lengths of a triangle?

I need to make a lot of similar calculations and wonder if it can be done in a smart way in Maple. Microsoft Excel is perfect for this kind of calculations, because you can downcopy cells. I would like to do everything in Maple, if possible, though. I have a number of points A, B, C, D, E, ... , which all lie on various circles in the plane. For every point radius and angle is given, so actually you can say that every point is delivered with polar coordinates. I want to have their rectangular coordinates. 

Maybe I could deliver their radii in a list and their angles in degrees in another list?

r:=[12,56,29,...., 78]:

v:=[15,45,75,..., 102]: 


I need to be able to refer to a certain point thorugh an index. At best it would be A, B, C, ... , but 1, 2, 3, ... will be acceptable. So in the end I need to be able to access say x_C and y_C or x_3 and y_3 (understood as index lowered). I hope someone can help me do the task in a nice a efefctive way.

NB! Maybe you have a solution, which involve transformation from polar to rectangular coordinates. That will be nice, but please also tell me how it can be done from scratch, because I want to be able to know about handling many points at once for other purposes, when the function is not r*cos(v), but an arbitrary function.



eq:=[Vector[row](4, {(1) = 0., (2) = 0., (3) = 0., (4) = 0.}), Vector[row](4, {(1) = -0.3381778526e-2, (2) = -.3381778526, (3) = -.3185010532, (4) = 0.}), Vector[row](4, {(1) = 0., (2) = 0., (3) = 0., (4) = 0.}), Vector[row](4, {(1) = 0., (2) = 0., (3) = 0., (4) = 0.}), Vector[row](4, {(1) = 0., (2) = 0., (3) = 0., (4) = 0.})]

how i can get a unique results:[Vector[row](4, {(1) = 0., (2) = 0., (3) = 0., (4) = 0.}), Vector[row](4, {(1) = -0.3381778526e-2, (2) = -.3381778526, (3) = -.3185010532, (4) = 0.})]


I need a list version of Contourplot. I have a list in the format [[z1,x1,y1],[z2,x2,y2],...[zn,xn,yn],...]

where z represents some data value at coordinate (x,y). Basically I need a 2D figure with the x and y values shown on the axes and the z-value represented in a color code. Just like "contourplot" except in my case I cannot use it since I do not know the general function of two variables but only the list  with the data points. Is this possible with a built in Maple command?





1 2 Page 1 of 2