Items tagged with list list Tagged Items Feed

Hi there,

I've been trying to find an equivalent to MATLAB's unique command in Maple, but I had no success.

I've seen that Maple would return the elements that are either repeated (FindRepetitions) or not repeated (MakeUnique), but not the indices within the original list.

Is there way to do that?



I am required to generate a list containing the square of numbers 1 through k where k is an arbitrary int,defined from 1 to n. To do this, I've currently got the following commands:

local k, mylist:=[];

for k from 1 to n do


end do;

where sumsquare() is a procedure I defined to compute the sum of the squares of 1 through a number passed as an argument

At present this gives me an out of bounds error. 

How can I initialize mylist to be of size n, like in other languages such as C++?


Page 1 of 1