Items tagged with array

Let say I have an array

A := Array([[1], [2], [3]])
Normally if I would like to extend it I will write, eg:

Extend(A, [[4], [5]])

But because this is not 1D array Maple will rise an error. Is there a way to go over this limitation?

Dear Pros, I'm a biginer so I have a question about my program.

I have a lot of arrays which are result from 2 while loop. Now, I want creat a matrix from them but i can't. So, could you help me to do it.

For detail: 

V[1]:=[ 1 2 3]

V[2]:=[2 3 4]

V[3]:=[3 4 5]

V[4]:=[2 6 7]

V[5]:=[7 8 9]



with type of V[i] is a array.

I searched and found a solution by manual to create a matrix as follow:


but in this case i can't but manual with n=100

please help me to have a Matrix.

Thank a lots.

Hi everybody, 


Could somebody just explain me why commands L[1..5] and L[3..6] below do not seem to return "the same type of thing" ?


L := Array(1..10, [$(1..10)]);

L := Array(1..10, {(1) = 1, (2) = 2, (3) = 3, (4) = 4, (5) = 5, (6) = 6, (7) = 7, (8) = 8, (9) = 9, (10) = 10})



Array([1, 2, 3, 4, 5])





Array(3 .. 6, {3 = 3, 4 = 4, 5 = 5, 6 = 6}, datatype = anything, storage = rectangular, order = Fortran_order)





Thank you for your attention


It seems as if arrays can only be displayed in 2-D form when the array dimensions start at 1.

Sometimes I want to construct arrays where an index starts from 0 (or other values). This is purely for my convenience in some problems. However such arrays do not display in 2-D form. Consider the displayed form of



Why doesn't the latter 'display' in 2-D form?

I am getting the error that maple was unable to allocate enough memmory for the computation. I have seen that some of the values could have been stored in a remember table so that they are accessed whenever needed. I am however using arrays and maple cannot tell when the entries in an array change, how about option cache? can that be useful? if not, how can I optimize my storage space?

I have this lists and I have written a program to process these lists and produce only the lists that certisfy a certain condition. Instead of printing these lists, I want just the total number of the lists produced. How can I do these? The only thing I can think of now is to append the lists in an Array and get the number of elements in the array, but this will be very inefficient since I am looking at a very big number here.


Any help is appreciated,



Hi there,

            I am new to maple. I want to ask a simple question.

            If I have a array, and I want its each component to take natural logarithm. How can I do?

            Eg:[2 3 4]->[ln(2) ln(3) ln(4)]

            Thanks in advance.



I have a number of outputs, and I want to put them into an Array witrhout specifying the index of the array, is there a way I can put all of them at once without putting them one by one? I am currently using Append, is there any other way other than Append?

Hi there,
I have a simple task to do with arrays. I have an 8x3000 array, whose columns are sometimes all zeroes (if any element in the column is zero then the entire column is zero). I want to eliminate the zero vectors, so I have this loop (the array is A)

for i from 1 to 3000 do
    while A(1,i)=0 do
    end do;
end do:

Setting "A:=DeleteColumn(A,i);" reduces the size of the array, so if all the zero columns have been deleted at "i=200", Maple will keep trying to check the next column, which doesn't exist anymore. This gives an "index out of bounds" error, but also records "A" as the new smaller array, which is fine.

If I run this loop inside a procedure, the error stops the procedure, but it doesn't record the new array, it stays as the older, larger one. Does anyone know of a way around this?

Any help would be much appreciated.

Hi dear experts

I'm wrote a complicated code for stress computation and define each component of stresses for n layers in a n dimension array.

for example (for srr component):  srr[1]:=f1(r,theta) , srr[2]=f2... , ..., srr[n]=fn(r,theta)

n is defined in the start of worksheet and is no. of layers!

so, i want to plot all of layer functions in a same coordinate plane.( beacause they are discontinuse and i want show that)

note: display command don't do that and plot them in a table form! :(

how can i do that?


thanks for participate.

I want do loop with comand for to generate 20 arrays with radon variable 

I do

for i from 1 to 20 do
for k from 1 to 20 do
X[k] := evalf(F[k])
end do:
end do;


But bug all

HI all,


I have 

> sol2 := dsolve({odesys, H(0) = 4995, R(0) = 65000, W(0) = 102000, l(0) = 96000}, numeric, method = rosenbrock);
print(`output redirected...`); 
proc(x_rosenbrock) ... end;


I want to have a list of my solutions, t, H(t), R(t), W(t), l(t) that I can put into a spreadsheet (.csv, .txt, etc.), for 600 timesteps. 


There are some answers out there, but I am confused by them, and have not been able to make it work.





I have an array/vector of values as results of a function:



Now I need the maximum of absolute values of G!!

=maple("max(G)") I have maximum, but I want =maple("max(abs(G))") But there is an error in this expression!!



To gererate a random initail cofigration -1 or 1

spin = (-1).^(round(rand(N)));


for i=1:1000,


neighbours = circshift(spin, [ 0 1]) + ...

circshift(spin, [ 0 -1]) + ...

circshift(spin, [ 1 0]) + ...

circshift(spin, [-1 0]);

how to do this in maple?

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.

1 2 3 4 5 6 7 Last Page 1 of 27