Items tagged with list list Tagged Items Feed

I have the following command.

message := `Kajian ini mempunyai tiga objektif pertama seperti yang ditunjukkan dalam bahagian 1.11. Objektif tersebut harus`;

m := convert(message, bytes);

block := map(convert, m, binary);
block := map2(nprintf, "%08d", block);
block := map(proc (t) options operator, arrow; [seq(parse(convert(t, string)[i]), i = 1 .. length(convert(t, string)))] end proc, block);

block := [[0, 1, 0, 0, 1, 0, 1, 1], [0, 1, 1, 0, 0, 0, 0, 1], [0, 1, 1, 0, 1, 0, 1, 0], [0, 1, 1, 0, 1, 0, 0, 1], ........]

for i to l do
for j from 3 to 7 do
block[i][j] := 1-block[i][j];  //used to flip bit in between 3rd to 7th bit in a block
end do;
c_block[i] := block[i];
end do;
c_block1 := [seq(c_block[i], i = 1 .. l)];

Error, assigning to a long list, please use Arrays

May i know how to solve this problem? I need to change some bit in a list but receive error when there is more than 100 elements in a list. Thank you.

I have a long list of two element lists, for example,

A := [ [2,3], [4,5] ,[6,7]];

I want apply '/' to the elements of each sublist.

The result will be

R := [2/3, 4/5, 6/7];

I do not need the list, I could use vectors or matrices.

Is it possible to do this other than by iteration?

Tom Dean

How to reverse the order in a list?


i have m := [1, 1, 0, 0, 1, 1, 1, 0]

I want to get the output like newm:=[0,1,1,1,0,0,1,1].

How to solve? Any command can help?

If L is a list [a,c,b,d,f,e]

S is a list [b,c,f,e]

I want to use the permutation opf S to rearrange L [b,c,f,e,a,d]

In my case a,b,c,d,e,f are equations.

Does anyone know how to do crossover between block of binary number?

Example :

If I have 4 blocks, [0011001],[0011100], [0101010], and [1001110].

the first block will crossover with the second block, the second block will crossover with the third block, the third block will crossover with the last block and the last block must crossover with the first block. 

I had tried the code as below. 

for i from 1 to 4 do

for j from 1 to 7 do


end do;


end do;

The problem is the crossover can be done from 1 with 2, 2 with 3 and 3 with 4. But this code unwork for crossover for last block with the first block. Can someone help me? thank you in advance.

Dear Maple users

I wanted to use the zip-command to muliply two lists with units. It works without units, but not with units:



If I add units to each entrance it works too, but not very convenient. How is it done with units in the best way?







Hi, anyone know hot i need to continue my command to get 462 from [4,6,2]?

Thank you~=]]




Hi, how i need to continue my command to get [4,6,8] from 468?

Thank you~=]]








Hi, anyone know how i need to continue my command to add in kekuncirahsia(3) into nilaiASCII?
What i want to get>>[78,117,108,115,119,115,106,117,100,105,108]

Thank you, Have a nice day~=]]

Here is my command


> teksbiasa:=`Kriptografi`;




>nilaiASCII:=convert(teksbiasa, bytes);





Anyone know how i need to write the command to add the lenght of the text (len) into each of the number in nilaiASCII?

What is want to get is:


Thank you~=]]


Is there a way in Maple to convert a list into a string of numbers?

So [1,2,3,4,5] -> 12345

I have tried Maple help, but there are too many convert commands to try them all.
And the ones I have tried didn't work.



2*t*exp(t) + 2*t

would like to apply op recurively 

and output list



I have a list


I want to be able to tell what position the element [3,5] is in the list

I'm using


is there anything faster

maybe instead of storing as a list, I can use rtables or something?

thankyou for your time


A small question : what does [] mean at the end of a function or a list ? 

constants:= ({constants} minus {gamma})[]:


Thank you for your help

Hi, I need help finding the index of a given element in a list?

Say I have A:=[2,4,6,8,10,12], I want something that can do something like this:




Thanks, and sorry if my questions are trivial but I'm (clearly) not great with maple.

Now say I had two lists:



How would I get maple to return the index of the first element in list B that matches an element in list A, and the index of said element in list A? 

So something (remotely) like:

                        B[5], A[7]

(So I'm not looking for the first case of A[i]=B[i]. I just want i, j where A[i]=B[j])

1 2 3 4 Page 1 of 4