Items tagged with list list Tagged Items Feed

Dear Maple users

The formula f = c/λ is expressing the frequency in terms of the velocity of light  c and the wavelength λ. Lets say given not just one wavelength, but a whole list af wavelengths. The values have units attached. I wonder if there is an elegant way to have Maple calculate the all the frequencies, eventually delivering them in a new list?

I want the units of the output reduced to SI-units,...

Let a list of n positive integers be given, e. g. [2,1,4].
Let us consider all sums of  all its members signed by +-, e. g
-2-1-4=-7, -2+1-4=-5, -2-1+4=1, ... .
How to find the sum having the minimum  absolute value with Maple?

have a list of lists, and I would like to write each of these lists on a separate file, *on a single line*.

For instance consider the following trivial example:

P := [[-.3819660120, .6180339880, -10000, -2], [.6180339880, 1.618033988, -10000, -1], [1.618033988, 10000, -10000, -.5], [2.618033988, 10000, -.5, -0.1e-3], [2.618033988, 10000, 0.1e-3, .5]]

I would like to create
 + a file named  P1.dat containing the line
     ...

I have a procedure that gets two lists A and B, I want to restore the name of the entry lists as string. How can I do that?

 

f(A,B) [procedure]

e.g. a(MyList,LL)

 

I want to restore a:="MyList" and b="LL"

 

TIA

A little problem

November 15 2011 by Fei Wang 15 Maple 15

When using the command "for", the results are placed in a column,such as if we input
for i from 1 to 3 do  i end do, the results are showed as

1

2

3.

This style is not convient to use for following computation. So how to put all results into a list or set ?

Hi i'm new to maple.

Is there a way to remove commas from a list?

I was able to remove the list from its brackets []
but i was wondering if I'm able to remove the commas also?

Giving a expression as follows, how to extract  powers of g to a list?

 In this example the list of powers of g is {2,1,2}

6*F*u[0, x]*g[x, x]*g^2+24*F*u[0]*g[x]^3-18*F*u[0]*g[x]*g[x, x]*g+2*F*u[0]*g[x, x, x]*g^2

I have written lists of parameter values and functional forms which I read at the top of the worksheet and use subsequently when I need numerical output.

For instance,

Parameters1 := [ s = 2 ];
Functions1 := [ U = 'proc(c) (c^(1-s)-1)/(1-s); end proc' ];
eval(eval(U(c), Functions1), Parameters1);
                             ...

Removing elements from a list.

October 13 2011 by Lockoman 5 Maple

Hello there, 

I have been having trouble removing elements from a list using the subsop tool.

I have a list A containing smaller lists of 2 values (A=[[0,1],[2,2],[4,5],[-1,-2], ... ]). My goal is to set boudaries to these sublists such as if the "y" (second value in any sublist) value is greater than 3, remove it from the list. here is what my code looks like

 

for i from i to n do
  if evalf(op(2,op(i,A))) < 0 then 
    subsop(i=NULL,A);
  fi;
od;

Hi,

I need to do this:

A:=[1,3,5,2,7];
B:=[2,5];

f(B,A)=[3,7]

Notice that the elements in A can be lists themselves. How can I define such kind of function?

TIA for the help

for example:
i want to know how many numbers generated in this loops

 

[seq([seq(i, j = i .. 5)], i = 1 .. 5)]

[1, 1, 1, 1, 1], [2, 2, 2, 2], [3, 3, 3], [4, 4], [5];

 

as if there is no way that can make a "++" increment operator in maple 12

I have a variable number of pointplots c[1] .. c[i] and i want to plot all in a single plot.

I tried display(c[k],k=1..i); or display(c[k]$k=1..i); but i got an error. Typing evey list like: display(c1,c2,c3,....); is not possible because i is variable. What can i do?

How can we draw a sequence of segments with a list data of column vector? Thanks

Hello everybody,

I would like to assign 349 different variable not already existing (w[i], i from 1 to 349) to 349 expressions from a list. Unfortunately I do not know how to write it. When I try anything like a:=w[33]->listevnouveau[33], it does not work.

With this a, I want to solve this : solve(listedd[33]*w[33]=a,w[33]); which is only possible by assigning variable to the expression.

Regard, Charbo

Following Christopher2222 request, I wrote the following procedures for "exact" cubic Hermite spline interpolation,

p:=proc(x0,p0,m0,x1,p1,m1,x)
local t,d;
d:=x1-x0;
t:=(x-x0)/d;
p0+(d*m0+(3*(p1-p0)-d*(2*m0+m1)+(2*(p0-p1)+d*(m0+m1))*t)*t)*t
end:

pb:=proc(x0,p0,x1,p1,m1,x)
local t,d;
d:=x1-x0;
t:=(x-x0)/d;
p0+(2*(p1-p0)-d*m1+(p0-p1+d*m1)*t)*t
end:

pe:=proc(x0,p0,m0,x1,p1,x...
1 2 3 4 5 6 7 Last Page 1 of 40