[go: up one dir, main page]

Items tagged with list

Feed App Center
Also available: list

Suppose I have a list of differential equations:

L:=[x*diff(f(x),x)+2*x+1=0, 4*(diff(f(x),x$2))^2+7*diff(f(x),x)-2=0, x*diff(f(x),x)+2*x+1=0, 3*(diff(f(x),x))^2-f(x)-1=0];

how can I rewrite this list such that 
L:=[[x*diff(f(x),x)+2*x+1=0,2], [4*(diff(f(x),x$2))^2+7*diff(f(x),x)-2=0,1], [3*(diff(f(x),x))^2-f(x)-1=0,1]];
i.e., rewrite this list as the [equation, Number of occurrences in the list]

Only for my understanding. In the following I need to use expand to apply division to list elements when the divisor is a name:

[a, b]*(1/2)

[(1/2)*a, (1/2)*b]

(1)

[a, b]/c

[a, b]/c

(2)

expand([a, b]/c)

[a/c, b/c]

(3)

NULL

Does in this case automatic simplification make a difference between numbers and names? (Probably this is explained somewhere.)

Download div_of_list.mw

Hello,

I'm seeking an efficient solution to a particular problem. To illustrate, I'll provide a simplified example, though in practice, I'm handling lists with millions of elements.

Let's take the list, l: [1, 2, 3, 4, 5, 6, 7, 8]. Each element in this list has a corresponding twin. For instance, 1 has twins [4, 5], and 2 has twins [9, 12] (note that 12 is not in the original list, but that's not problematic). The complete list of twins is represented as t: [[4, 5], [9, 12], [6, 8], [1, 5], [1, 4], [3, 8], [13, 14, 17], [3, 6], [2, 12], [11, 12, 15]], and the twins are made available as they are needed.

The objective is to remove all twins starting from the first element of the list. Once a twin is removed, there's no need to check for twins for that particular element. For example, consider the first element, 1; the twins [4, 5] are removed, and there's no need to find the twins for those elements. The desired outcome would be the list [1, 2, 3, 7,10].

My solution utilizes a combination of a while loop and sets. However, it's painfully slow when dealing with lists larger than a few hundred thousand elements. 

Many thanks.  

Hi

I would like to create/import a list from a text-file. The text-file "example.txt" has the following structur:

1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 12
11 14

On every line are two numbers, separated by a space. The list should contain only the second number, in this example

L:=[1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 14].

The original text-file has 12615 lines, the biggest number is around  3.126 * 10^139.

Thanks for your help.

S := [1, 2];
                          S := [1, 2]

T := [1, 2];
                          T := [1, 2]

is(S = T);
                              true

Sv := Vector([1, 2]);
                              

Tv := Vector([1, 2]);
                              

is(Sv = Tv);
                             false

is(convert(Sv, list) = convert(Tv, list));
                              true

I have a lists within lists.  I needed to search for a specific element in the sub-list and need to extract each such sublist that has an element.

I am only familiar with the search tool. Could someone suggest a simple way to do this.

For example, I have the following.

s := [{f0(t, r) = 0, n(t) = n(t)}, {f0(t, r) = 0, n(t) = 0}, {f0(t, r) = 0, n(t) = 0}]

I need to extract the sublist that has n(t)=n(t) so only the first element of the list s.

This is from a graph G with vertex set {0,1,2,3,4,5,6,7,8,9} always labelled from {0,1,2,3,...,n-1}

L:=[{{0, 1}, {0, 3}, {0, 5}, {0, 7}, {2, 9}}, {{0, 1}, {0, 3}, {0, 5}, {0, 7}, {4, 9}}, {{0, 1}, {0, 3}, {0, 5}, {0, 7}, {6, 9}}, {{0, 1}, {0, 3}, {0, 5}, {0, 7}, {8, 9}}, {{0, 1}, {0, 3}, {0, 5}, {0, 9}, {2, 7}}, {{0, 1}, {0, 3}, {0, 5}, {0, 9}, {4, 7}}, {{0, 1}, {0, 3}, {0, 5}, {0, 9}, {6, 7}}, {{0, 1}, {0, 3}, {0, 5}, {0, 9}, {7, 8}}, {{0, 1}, {0, 3}, {0, 7}, {0, 9}, {2, 5}}, {{0, 1}, {0, 3}, {0, 7}, {0, 9}, {4, 5}}, {{0, 1}, {0, 3}, {0, 7}, {0, 9}, {5, 6}}, {{0, 1}, {0, 3}, {0, 7}, {0, 9}, {5, 8}}, {{0, 1}, {0, 5}, {0, 7}, {0, 9}, {2, 3}}, {{0, 1}, {0, 5}, {0, 7}, {0, 9}, {3, 4}}, {{0, 1}, {0, 5}, {0, 7}, {0, 9}, {3, 6}}, {{0, 1}, {0, 5}, {0, 7}, {0, 9}, {3, 8}}, {{0, 1}, {1, 2}, {1, 4}, {1, 6}, {3, 8}}, {{0, 1}, {1, 2}, {1, 4}, {1, 6}, {5, 8}}, {{0, 1}, {1, 2}, {1, 4}, {1, 6}, {7, 8}}, {{0, 1}, {1, 2}, {1, 4}, {1, 6}, {8, 9}}, {{0, 1}, {1, 2}, {1, 4}, {1, 8}, {3, 6}}, {{0, 1}, {1, 2}, {1, 4}, {1, 8}, {5, 6}}, {{0, 1}, {1, 2}, {1, 4}, {1, 8}, {6, 7}}, {{0, 1}, {1, 2}, {1, 4}, {1, 8}, {6, 9}}, {{0, 1}, {1, 2}, {1, 6}, {1, 8}, {3, 4}}, {{0, 1}, {1, 2}, {1, 6}, {1, 8}, {4, 5}}, {{0, 1}, {1, 2}, {1, 6}, {1, 8}, {4, 7}}, {{0, 1}, {1, 2}, {1, 6}, {1, 8}, {4, 9}}, {{0, 1}, {1, 4}, {1, 6}, {1, 8}, {2, 3}}, {{0, 1}, {1, 4}, {1, 6}, {1, 8}, {2, 5}}, {{0, 1}, {1, 4}, {1, 6}, {1, 8}, {2, 7}}, {{0, 1}, {1, 4}, {1, 6}, {1, 8}, {2, 9}}, {{0, 1}, {2, 3}, {2, 5}, {2, 7}, {2, 9}}, {{0, 1}, {2, 3}, {3, 4}, {3, 6}, {3, 8}}, {{0, 1}, {2, 5}, {4, 5}, {5, 6}, {5, 8}}, {{0, 1}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{0, 1}, {2, 9}, {4, 9}, {6, 9}, {8, 9}}, {{0, 1}, {3, 4}, {4, 5}, {4, 7}, {4, 9}}, {{0, 1}, {3, 6}, {5, 6}, {6, 7}, {6, 9}}, {{0, 1}, {3, 8}, {5, 8}, {7, 8}, {8, 9}}, {{0, 3}, {0, 5}, {0, 7}, {0, 9}, {1, 2}}, {{0, 3}, {0, 5}, {0, 7}, {0, 9}, {1, 4}}, {{0, 3}, {0, 5}, {0, 7}, {0, 9}, {1, 6}}, {{0, 3}, {0, 5}, {0, 7}, {0, 9}, {1, 8}}, {{0, 3}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 3}, {1, 2}, {2, 5}, {2, 7}, {2, 9}}, {{0, 3}, {1, 2}, {3, 4}, {3, 6}, {3, 8}}, {{0, 3}, {1, 4}, {2, 3}, {3, 6}, {3, 8}}, {{0, 3}, {1, 4}, {4, 5}, {4, 7}, {4, 9}}, {{0, 3}, {1, 6}, {2, 3}, {3, 4}, {3, 8}}, {{0, 3}, {1, 6}, {5, 6}, {6, 7}, {6, 9}}, {{0, 3}, {1, 8}, {2, 3}, {3, 4}, {3, 6}}, {{0, 3}, {1, 8}, {5, 8}, {7, 8}, {8, 9}}, {{0, 3}, {2, 3}, {3, 4}, {3, 6}, {5, 8}}, {{0, 3}, {2, 3}, {3, 4}, {3, 6}, {7, 8}}, {{0, 3}, {2, 3}, {3, 4}, {3, 6}, {8, 9}}, {{0, 3}, {2, 3}, {3, 4}, {3, 8}, {5, 6}}, {{0, 3}, {2, 3}, {3, 4}, {3, 8}, {6, 7}}, {{0, 3}, {2, 3}, {3, 4}, {3, 8}, {6, 9}}, {{0, 3}, {2, 3}, {3, 6}, {3, 8}, {4, 5}}, {{0, 3}, {2, 3}, {3, 6}, {3, 8}, {4, 7}}, {{0, 3}, {2, 3}, {3, 6}, {3, 8}, {4, 9}}, {{0, 3}, {2, 5}, {3, 4}, {3, 6}, {3, 8}}, {{0, 3}, {2, 5}, {4, 5}, {5, 6}, {5, 8}}, {{0, 3}, {2, 7}, {3, 4}, {3, 6}, {3, 8}}, {{0, 3}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{0, 3}, {2, 9}, {3, 4}, {3, 6}, {3, 8}}, {{0, 3}, {2, 9}, {4, 9}, {6, 9}, {8, 9}}, {{0, 5}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 5}, {1, 2}, {2, 3}, {2, 7}, {2, 9}}, {{0, 5}, {1, 2}, {4, 5}, {5, 6}, {5, 8}}, {{0, 5}, {1, 4}, {2, 5}, {5, 6}, {5, 8}}, {{0, 5}, {1, 4}, {3, 4}, {4, 7}, {4, 9}}, {{0, 5}, {1, 6}, {2, 5}, {4, 5}, {5, 8}}, {{0, 5}, {1, 6}, {3, 6}, {6, 7}, {6, 9}}, {{0, 5}, {1, 8}, {2, 5}, {4, 5}, {5, 6}}, {{0, 5}, {1, 8}, {3, 8}, {7, 8}, {8, 9}}, {{0, 5}, {2, 3}, {3, 4}, {3, 6}, {3, 8}}, {{0, 5}, {2, 3}, {4, 5}, {5, 6}, {5, 8}}, {{0, 5}, {2, 5}, {3, 4}, {5, 6}, {5, 8}}, {{0, 5}, {2, 5}, {3, 6}, {4, 5}, {5, 8}}, {{0, 5}, {2, 5}, {3, 8}, {4, 5}, {5, 6}}, {{0, 5}, {2, 5}, {4, 5}, {5, 6}, {7, 8}}, {{0, 5}, {2, 5}, {4, 5}, {5, 6}, {8, 9}}, {{0, 5}, {2, 5}, {4, 5}, {5, 8}, {6, 7}}, {{0, 5}, {2, 5}, {4, 5}, {5, 8}, {6, 9}}, {{0, 5}, {2, 5}, {4, 7}, {5, 6}, {5, 8}}, {{0, 5}, {2, 5}, {4, 9}, {5, 6}, {5, 8}}, {{0, 5}, {2, 7}, {4, 5}, {5, 6}, {5, 8}}, {{0, 5}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{0, 5}, {2, 9}, {4, 5}, {5, 6}, {5, 8}}, {{0, 5}, {2, 9}, {4, 9}, {6, 9}, {8, 9}}, {{0, 7}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 7}, {1, 2}, {2, 3}, {2, 5}, {2, 9}}, {{0, 7}, {1, 2}, {4, 7}, {6, 7}, {7, 8}}, {{0, 7}, {1, 4}, {2, 7}, {6, 7}, {7, 8}}, {{0, 7}, {1, 4}, {3, 4}, {4, 5}, {4, 9}}, {{0, 7}, {1, 6}, {2, 7}, {4, 7}, {7, 8}}, {{0, 7}, {1, 6}, {3, 6}, {5, 6}, {6, 9}}, {{0, 7}, {1, 8}, {2, 7}, {4, 7}, {6, 7}}, {{0, 7}, {1, 8}, {3, 8}, {5, 8}, {8, 9}}, {{0, 7}, {2, 3}, {3, 4}, {3, 6}, {3, 8}}, {{0, 7}, {2, 3}, {4, 7}, {6, 7}, {7, 8}}, {{0, 7}, {2, 5}, {4, 5}, {5, 6}, {5, 8}}, {{0, 7}, {2, 5}, {4, 7}, {6, 7}, {7, 8}}, {{0, 7}, {2, 7}, {3, 4}, {6, 7}, {7, 8}}, {{0, 7}, {2, 7}, {3, 6}, {4, 7}, {7, 8}}, {{0, 7}, {2, 7}, {3, 8}, {4, 7}, {6, 7}}, {{0, 7}, {2, 7}, {4, 5}, {6, 7}, {7, 8}}, {{0, 7}, {2, 7}, {4, 7}, {5, 6}, {7, 8}}, {{0, 7}, {2, 7}, {4, 7}, {5, 8}, {6, 7}}, {{0, 7}, {2, 7}, {4, 7}, {6, 7}, {8, 9}}, {{0, 7}, {2, 7}, {4, 7}, {6, 9}, {7, 8}}, {{0, 7}, {2, 7}, {4, 9}, {6, 7}, {7, 8}}, {{0, 7}, {2, 9}, {4, 7}, {6, 7}, {7, 8}}, {{0, 7}, {2, 9}, {4, 9}, {6, 9}, {8, 9}}, {{0, 9}, {1, 2}, {1, 4}, {1, 6}, {1, 8}}, {{0, 9}, {1, 2}, {2, 3}, {2, 5}, {2, 7}}, {{0, 9}, {1, 2}, {4, 9}, {6, 9}, {8, 9}}, {{0, 9}, {1, 4}, {2, 9}, {6, 9}, {8, 9}}, {{0, 9}, {1, 4}, {3, 4}, {4, 5}, {4, 7}}, {{0, 9}, {1, 6}, {2, 9}, {4, 9}, {8, 9}}, {{0, 9}, {1, 6}, {3, 6}, {5, 6}, {6, 7}}, {{0, 9}, {1, 8}, {2, 9}, {4, 9}, {6, 9}}, {{0, 9}, {1, 8}, {3, 8}, {5, 8}, {7, 8}}, {{0, 9}, {2, 3}, {3, 4}, {3, 6}, {3, 8}}, {{0, 9}, {2, 3}, {4, 9}, {6, 9}, {8, 9}}, {{0, 9}, {2, 5}, {4, 5}, {5, 6}, {5, 8}}, {{0, 9}, {2, 5}, {4, 9}, {6, 9}, {8, 9}}, {{0, 9}, {2, 7}, {4, 7}, {6, 7}, {7, 8}}, {{0, 9}, {2, 7}, {4, 9}, {6, 9}, {8, 9}}, {{0, 9}, {2, 9}, {3, 4}, {6, 9}, {8, 9}}, {{0, 9}, {2, 9}, {3, 6}, {4, 9}, {8, 9}}, {{0, 9}, {2, 9}, {3, 8}, {4, 9}, {6, 9}}, {{0, 9}, {2, 9}, {4, 5}, {6, 9}, {8, 9}}, {{0, 9}, {2, 9}, {4, 7}, {6, 9}, {8, 9}}, {{0, 9}, {2, 9}, {4, 9}, {5, 6}, {8, 9}}, {{0, 9}, {2, 9}, {4, 9}, {5, 8}, {6, 9}}, {{0, 9}, {2, 9}, {4, 9}, {6, 7}, {8, 9}}, {{0, 9}, {2, 9}, {4, 9}, {6, 9}, {7, 8}}, {{1, 2}, {2, 3}, {2, 5}, {2, 7}, {4, 9}}, {{1, 2}, {2, 3}, {2, 5}, {2, 7}, {6, 9}}, {{1, 2}, {2, 3}, {2, 5}, {2, 7}, {8, 9}}, {{1, 2}, {2, 3}, {2, 5}, {2, 9}, {4, 7}}, {{1, 2}, {2, 3}, {2, 5}, {2, 9}, {6, 7}}, {{1, 2}, {2, 3}, {2, 5}, {2, 9}, {7, 8}}, {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {4, 5}}, {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {5, 6}}, {{1, 2}, {2, 3}, {2, 7}, {2, 9}, {5, 8}}, {{1, 2}, {2, 5}, {2, 7}, {2, 9}, {3, 4}}, {{1, 2}, {2, 5}, {2, 7}, {2, 9}, {3, 6}}, {{1, 2}, {2, 5}, {2, 7}, {2, 9}, {3, 8}}, {{1, 2}, {3, 4}, {4, 5}, {4, 7}, {4, 9}}, {{1, 2}, {3, 6}, {5, 6}, {6, 7}, {6, 9}}, {{1, 2}, {3, 8}, {5, 8}, {7, 8}, {8, 9}}, {{1, 4}, {2, 3}, {2, 5}, {2, 7}, {2, 9}}, {{1, 4}, {2, 3}, {4, 5}, {4, 7}, {4, 9}}, {{1, 4}, {2, 5}, {3, 4}, {4, 7}, {4, 9}}, {{1, 4}, {2, 7}, {3, 4}, {4, 5}, {4, 9}}, {{1, 4}, {2, 9}, {3, 4}, {4, 5}, {4, 7}}, {{1, 4}, {3, 4}, {4, 5}, {4, 7}, {6, 9}}, {{1, 4}, {3, 4}, {4, 5}, {4, 7}, {8, 9}}, {{1, 4}, {3, 4}, {4, 5}, {4, 9}, {6, 7}}, {{1, 4}, {3, 4}, {4, 5}, {4, 9}, {7, 8}}, {{1, 4}, {3, 4}, {4, 7}, {4, 9}, {5, 6}}, {{1, 4}, {3, 4}, {4, 7}, {4, 9}, {5, 8}}, {{1, 4}, {3, 6}, {4, 5}, {4, 7}, {4, 9}}, {{1, 4}, {3, 6}, {5, 6}, {6, 7}, {6, 9}}, {{1, 4}, {3, 8}, {4, 5}, {4, 7}, {4, 9}}, {{1, 4}, {3, 8}, {5, 8}, {7, 8}, {8, 9}}, {{1, 6}, {2, 3}, {2, 5}, {2, 7}, {2, 9}}, {{1, 6}, {2, 3}, {5, 6}, {6, 7}, {6, 9}}, {{1, 6}, {2, 5}, {3, 6}, {6, 7}, {6, 9}}, {{1, 6}, {2, 7}, {3, 6}, {5, 6}, {6, 9}}, {{1, 6}, {2, 9}, {3, 6}, {5, 6}, {6, 7}}, {{1, 6}, {3, 4}, {4, 5}, {4, 7}, {4, 9}}, {{1, 6}, {3, 4}, {5, 6}, {6, 7}, {6, 9}}, {{1, 6}, {3, 6}, {4, 5}, {6, 7}, {6, 9}}, {{1, 6}, {3, 6}, {4, 7}, {5, 6}, {6, 9}}, {{1, 6}, {3, 6}, {4, 9}, {5, 6}, {6, 7}}, {{1, 6}, {3, 6}, {5, 6}, {6, 7}, {8, 9}}, {{1, 6}, {3, 6}, {5, 6}, {6, 9}, {7, 8}}, {{1, 6}, {3, 6}, {5, 8}, {6, 7}, {6, 9}}, {{1, 6}, {3, 8}, {5, 6}, {6, 7}, {6, 9}}, {{1, 6}, {3, 8}, {5, 8}, {7, 8}, {8, 9}}, {{1, 8}, {2, 3}, {2, 5}, {2, 7}, {2, 9}}, {{1, 8}, {2, 3}, {5, 8}, {7, 8}, {8, 9}}, {{1, 8}, {2, 5}, {3, 8}, {7, 8}, {8, 9}}, {{1, 8}, {2, 7}, {3, 8}, {5, 8}, {8, 9}}, {{1, 8}, {2, 9}, {3, 8}, {5, 8}, {7, 8}}, {{1, 8}, {3, 4}, {4, 5}, {4, 7}, {4, 9}}, {{1, 8}, {3, 4}, {5, 8}, {7, 8}, {8, 9}}, {{1, 8}, {3, 6}, {5, 6}, {6, 7}, {6, 9}}, {{1, 8}, {3, 6}, {5, 8}, {7, 8}, {8, 9}}, {{1, 8}, {3, 8}, {4, 5}, {7, 8}, {8, 9}}, {{1, 8}, {3, 8}, {4, 7}, {5, 8}, {8, 9}}, {{1, 8}, {3, 8}, {4, 9}, {5, 8}, {7, 8}}, {{1, 8}, {3, 8}, {5, 6}, {7, 8}, {8, 9}}, {{1, 8}, {3, 8}, {5, 8}, {6, 7}, {8, 9}}, {{1, 8}, {3, 8}, {5, 8}, {6, 9}, {7, 8}}]

Now to Split the List L to sublists like this

Now going through L list in details (All my lists will be like this only}

Sublist L1 will have all those from first in this firstly we see  edge {0,1} we take all those which take {0,1} in sequencial manner and put in sublist L1

Now as we proceed we see the next starting edge is {0,3} so their is none with {0,2} so we pick all those with {0,3} in the first sequencial manner and put in sublist L2

Similiar we pick all sublist from this with first element unique in the sequential manner and make a list of lists

Lk:=[L1,L2,L3,L4,....]

Code until L

which was done

Toy_code_(1).mw

Now again proceed we can observe we can see their none with {0,4} next is only with {0,5} 

Then i need write a function F which takes a List say L1 returns

all possible 2 element permutions from L1 list say [S1,S2] and [S2,S1] like that all possible as order also matter where that set is positioned

I have list of lists I looking to Shuffle the entire List of lists in a very very non-sequencial manner everthing thing fully shuffled.

I tried but I am unable to find the right way.

Attached a code I tried

Code like below

toy_shuffle.mw

From a list of strings say

L:=[k$1,y$23,f$25,........]

A particular type of delimiter will their which is  common to all elements in the list the right side is always a number 

The function takes the list, and the delimiter as input

Then it outputs a list of 

Numbers which is on the right side of the delimiter 

Output will be like 

[1,23,25,...]

The delimiters could be a space 

Or 

Space on both sides of dollars

That is in understanding space should also be considered in delimiter that is anything significant 

This is really a question on getting index positions of a sub list from the main list.

Have a list of Vertices and a list of populations for each vertes.

Then from the Neighbours list I need the respective positions in the Vertex list to sum to corresponding values from the population list.

2nd Question  Can the population values be displayed near its vertex or in the vertes circle? e.g y=5

restart

NULL

with(GraphTheory)

with(SpecialGraphs)

Vs := [x, y, z, w]

[x, y, z, w]

Popvs := [-2, 1, 6, 3]

[-2, 1, 6, 3]

newPopsvs := Popvs

[-2, 1, 6, 3]

``

X := Graph(Vs)

GRAPHLN(undirected, unweighted, [x, y, z, w], Array(1..4, {(1) = {}, (2) = {}, (3) = {}, (4) = {}}), `GRAPHLN/table/1`, 0)

``

AddEdge(X, {{w, y}, {w, z}, {x, y}, {y, z}})

GRAPHLN(undirected, unweighted, [x, y, z, w], Array(1..4, {(1) = {2}, (2) = {1, 3, 4}, (3) = {2, 4}, (4) = {2, 3}}), `GRAPHLN/table/1`, 0)

Nbs := [seq(Neighbors(X, Vs[i]), i = 1 .. nops(Vs))]

[[y], [x, z, w], [y, w], [y, z]]

``

vp := [[0, 0], [1, 0], [1.5, 1], [2, 0]]

[[0, 0], [1, 0], [1.5, 1], [2, 0]]

SetVertexPositions(X, vp)

DrawGraph(X)

k := rand(1 .. 4)

NULL

for c to nops(Nbs) do Nbs[c]; select(proc (i) options operator, arrow; Vs[i] = Nbs[c, 1 .. -1] end proc, [`$`(1 .. nops(Vs))]) end do

[]

NULL

Download Q_23-12-22_Test_Graph_indices_.mw

If I have a list say 

L:=[1,"2","3",4,5,"6",7,8,9,"10"]

Now i would like to have fuction which takes L as input say    split(L)

and would return two list one with characters from that namely ["2","3","6","10"] and another of integers [1,4,5,7,8,9] like this 

The list will have characters and integers only

Kind help it will be acknowleged

Hi please, how can I pair two lists and form another list? 

P := [.6286420119, -.6286420119, 0., 0., 0., 0., 0., 0., 0., 0., 0.]

Q = [2.106333379, 2.106333379, 4.654463885, 7.843624703, 10.99193295, 14.13546782, 17.27782732, 20.41978346, 23.56157073, 26.70327712, 29.84494078]

I want to pair them into something like this:

W := [ [.6286420119,2.106333379], [-.6286420119,  2.106333379] ... ]

Then use pointplot(W) and  display(seq(pointplot(W[j], j = 1 .. 20), insequence = true):

     Hello everyone !

     I have a problem asking for help:

     In the Oxy coordinate plane, for rectangles are limited by straight lines: x=1, x=7, y=1, y=9 and there are 63 points distinguished from coordinates that are integers located on this rectangle.

     These include:

  • 7 black points with coordinates are listed in the list:

[[1,1], [2,1], [3,1], [4,1], [5,1], [6,1], [7,1]].

  • 7 red points with coordinates are listed in the list:

[[1,2], [2,2], [3,2], [4,2], [5,2], [6,2], [7,2]].

  • 8 yellow points with coordinates are listed in the list:

[[1,3], [4,3], [5,3], [7,3], [1,4], [4,4], [5,4], [7,4] ].

  • 6 pink points with coordinates are listed in the list:

[[2,3], [3,3], [6,3], [2,4], [3,4], [6,4]].

  • 8 brown points with coordinates are listed in the list:

[[1,5], [3,5], [5,5], [7,5], [1,6], [3,6], [5,6], [7,6]].

  • 6 purple points with coordinates are listed:

[[2,5], [4,5], [6,5], [2,6], [4,6], [6,6]].

  • 9 blue points with coordinates are listed in the list:

[[1,7], [2,7], [7,7], [1,8], [2,8], [7,8], [1,9], [2,9], [7,9]].

  • 6 green points with coordinates are listed:

[[3,7], [5,7], [3,8], [5,8], [3,9], [5,9]].

  • 6 orange points with coordinates are listed in the list:

[[4,7], [6,7], [4,8], [6,8], [4,9], [6,9]].

     Help me find the integer coordinates of the 63 points when arranging them on the rectangle knowing that their HorizontalCoord has not changed, and the VerticalCoord of the points of the same color is always different with the Maple command.

     Thank you so much for your help!

I want to use this L3 list as the index of another list. I am trying to create a model for short time electricity load forecasting in Maple. I am fairly new to maple coding structures. Can anybody suggest an easier way for doing this kind of thing in Maple? Can I use matrix generation? Please give me suggestions. 
Note: Currently working in a Doc File. 
The code is pasted below: 

L1 := [seq([seq(seq1[i], i = 1 .. 7)], i = 1 .. 24)];

L2 := [seq(i, i = 1 .. 24)];



local(i, j, L3);
L3 = [];
for i to 24 do
    for j to 7 do if i = 1 then L3[i][j] := L1[i][j]; else L3[i][j] := L1[i][j] + L2[i] - 1; end if; end do;
end do;
print(L3);
1 2 3 4 5 6 7 Last Page 1 of 9