Also available:

## Mean - Real Measurements unsorted...

Hi Guys,

got my last Problem solved :) Now i do have a new one...

```restart; with(RealDomain); with(CodeGeneration); with(ExcelTools); with(plots);
dx1:=133;
dy1:=132;

n := 1;
for i to 256 do
for j to 256 do
r := evalf(sqrt((i-dx1)^2+(j-dy1)^2));
Ints := R0[i, j];
IntsR[n] := [r, Ints];
n := n+1
end do;
end do;
IntsR := [seq(IntsR[i], i = 1 .. n-1)]```

The list IntsR consists of unsorted values doublets. Now it would be nice to get some sort of mean value of my Ints over r.  Didnt really find a solution for it until now... do you have any hint?

## Append number to a list...

Experts,

This may sound like a dumb question, but i'm seeking a procedure to do it better.

with(combinat, setpartition) :
P := [\$2..5] :

Tours := setpartition(P);M:=nops(Tours)

 (1)

number of elements in each 'group'

seq(nops(Tours[i]),i=1..nops(Tours))

 (2)

i need to add 1 to each 'subgroup' : These are the first two:

[[[1,op(Tours[1,1])],[1,op(Tours[1,2])]],[[1,op(Tours[2,1])],[1,op(Tours[2,2])],[1,op(Tours[2,3])]]]

 (3)

I need to add 1 to each 'subgroup' in a more automatic way.

## Select part from list...

To select a piece from a list, for example:

lst:=[1,2,3,4,5,6]

I want to get the list piece from second place to fifth place: [2,3,4,5].

Is there a function?

Thanks

## Remove subscripts from functions in list and group...

I have a list of functions which looks like this:

`RR:={F[l, m-2, n-1], F[l, m+2, n], F[l, m+2, n-1], F[l-1, m+1, n-2], ...}`

I wish to remove the first and second arguments from the functions, so only leaving the third argument containing the n's. I then wish to group these remaining terms together to shorten the list. i.e.

```RR:={F[n-1], F[n], F[n-2]}
```

I have used the 'subsop' command with 1 and 2 specified as NULL in a loop, but I was wondering if there is a better way to do it? I like to avoid loops where possible and use some inbuilt Maple magic to make it tidier and (usually) more efficient.

-Yeti

## Find repetitions in a list...

I have to generate a random list of 30 elements and i have two variables: s, which is a counter for all the list which have got at least a repetition and variable n, for each list who has not repeated values, as in the code below.

I don't understand why, when i sum s and m i get a value which is not 100, why?

```for i by 1 to 100 do
list:=RandomTools[Generate](list(integer(range = 1 .. 365), 30));
if numelems(FindRepetitions(lista)) >= 1 then
s:=s+1;

else		n:=n+1;

end if;
end do;```

## Apply igcd to a list...

I have a list of univariate polynomials

P:=[x^2-7*x+10, x^2, x^2+2*x+1]

How do I get the gcd of all of these?

It doesn't like it when I do the following:

igcd(P)

Thanks

## How to create readonly list in Maple?...

You know we can create readonly Matrix in Maple, Is it possible to create readonly list in Maple?

## Remove specific number from a list...

I have a list of sample values and I want to remove just one maybe two of them.

list:=[13,16,16,29,34,33,33,12,22,26,25,25,25,11]:

How could I remove just one 25 from the list?

## Display a list of equations in column...

Hello,

I have a list of equations. I would like to display this list in column.
Problem : as each term of my list is an equation, i can not transform my list in a vector.
How can I do to display a list of equations in column ?

## Remove the permutation...

Hi all, i have a problem someone help me.

Define per(f(a,b,c)) = {f(a,b,c), f(b,c,a), f(c,a,b)}. I want to write a function removePer() that removes the permutations, example:

ds := {a, b, a^2, b^2, c, c + 2a, a - b, c^2, a + 2b, b + 2c}

then removePer(ds) return {a, a^2, c + 2a, a - b} because per(a) = {a, b, c}, per(a^2)  = {a^2, b^2, c^2} and per(c+2a) ={a+2b, b+2c, c+a}. Note that removePer(ds) can return {b, a^2, c + 2a, a - b} or {c, a^2, c + 2a, a - b}, ...  but just one result.

ds := {ab, bc, a - b^2, b - c^2, a^2, c - a^2},

then removePer(ds) return {ab, a - b^2, a^2}.

Thank you very much.

## Convert {} to [] and [] to {}....

Hi all, I have a problem someone can help me

F := {a^2, b^2, c^2, ab, bc, ca}

G := [a^2, b^2, c^2, ab, bc, ca]

How to convert F to G and G to F ?

Thanks you very much.

## How to substitute values from multiple lists into ...

Dear All

For six parameters, I have corresponding list of their values and there are eight values for every parameter. I need to put these values in a formula to obtain a list of output values. There are two formulas one for 'P' and next is for 'RL'. I have used value of 'P' to calculate value of 'RL'. There are some complex number too, for which I have used modulus and final value is calculated by using 'evalf', but this command is not returning proper values for list as required. But this command works fine when I use single value from every list to calculate RL.

The Maple sheet attached herewith.

List.mw

Regards

## Split one list into two...

I am new to Maple.

If i have a list (or a table) A:=[[1,2],[3,4],[5,6]

how can i split it into two lists B:=[1,3,5] and C:=[2,4,6] ? (all the 1st numbers in one list, and all 2nd numbers in another list).

## How to specify solution range for solve...

Hey,

I want to solve this equation and looking at the plot there are at least 3 solutions. I want the greatest/smallest negative solution. Unfortunately using solve with assumptions produces no results and solve without assumptions only finds two solutions.

 > #select greatest negative value from solution
 > restart:
 > expr:= ax*cos(lambda)+ay*sin(lambda)-(a+b*lambda)
 (1)
 > ax:=1:ay:=2:a:=0.5:b:=0.25: #examplanatory values
 > plot(expr)
 >
 > assume(-2*Pi
 >
 > sol_lambda:=[solve(expr=0,lambda, useassumptions)];# returns empty list even though without assumption one solution is found
 (2)
 > sol_lambda:=[solve(expr=0,lambda)]; #returns only two solutions even though looking at the plot 3 are there
 (3)
 > sol_l_v:=evalb~(sol_lambda<~0); #dirty workaraound
 (4)
 > sol_l_add:=[ListTools:-SearchAll(true,sol_l_v)] ; #this seems overly complicated
 >
 (5)
 > lambda:=sol_lambda[sol_l_add[-1]];  #to select the last entry
 >
 (6)
 > expr; #test
 >
 (7)
 >