Items tagged with array array Tagged Items Feed

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.

How can I use a matrix in timeseriesanalysis?


m3 := Import("d:\\bok6.xlsx")


Areachart works fine:

AreaChart([m3], color = "pink" .. "niagara Navy", title = "Tidslinje Tilluft og avtrekk")


But when matrix m3 is entered in timeseriesanalysis it gives a error:

ts1 := TimeSeries([m3], startdate = "2016-08-1", header = "Tilluft VAV setpunkt", enddate = "2016-08-01");

Error, (in TimeSeriesAnalysis:-TimeSeries) invalid input: too many and/or wrong type of arguments passed to TimeSeries:-ModuleCopy; first unused argument is [Array(1..4, 1..1, {(1, 1) = 155.0, (2, 1) = 142.0, (3, 1) = 133.0, (4, 1) = 122.0})]



I have loaded the following packages:

with*matrix  with*linearalgebra  with(plots)  with(Statistics)  with(TimeSeriesAnalysis)





I need to create n-order tensor filled with any symbolic variable, for exemple 'x', but "symbol" option works only on vectors and matrix, so i don't know how to do that on n-order array.

X := Vector(3, symbol = x);#------ Work
Matrix(3, 3, symbol = x);#------ Work

Array(1 .. 3, 1 .. 3, 1 .. 3, symbol = x);
Error, argument `symbol = x` is incorrect or out of order

And 2nd problem thet globaly i need to create symmetric n-order tensor with symmitry for any pair of index and with contraction for any couple of indexes equal to zero. As i understend i need to create a big list of equations for every individual pair of index and 2 conditions (contraction and symmitry) and solve it to get a match and combination of independent index and paste values in them?


Hello everyone!

I am wondering why the Tabulate command does not work with Explore. E.g.:

Explore(`DocumentTools:-Tabulate`([plot(sin(a*x)), plot(cos(x-a))]), parameters = [[a = 0 .. 10, controller = slider]])

I know that I can display an array of plots with the display(Array([....])) which works fine with explore but Tabulate is another good way to display multiple plots and it gives better control over individual plots properties (e.g. setting different size to different plots). Is this a bug or Tabulate is just not meant to work in that context?  

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