Items tagged with list list Tagged Items Feed

eq:=[Vector[row](4, {(1) = 0., (2) = 0., (3) = 0., (4) = 0.}), Vector[row](4, {(1) = -0.3381778526e-2, (2) = -.3381778526, (3) = -.3185010532, (4) = 0.}), Vector[row](4, {(1) = 0., (2) = 0., (3) = 0., (4) = 0.}), Vector[row](4, {(1) = 0., (2) = 0., (3) = 0., (4) = 0.}), Vector[row](4, {(1) = 0., (2) = 0., (3) = 0., (4) = 0.})]

how i can get a unique results:[Vector[row](4, {(1) = 0., (2) = 0., (3) = 0., (4) = 0.}), Vector[row](4, {(1) = -0.3381778526e-2, (2) = -.3381778526, (3) = -.3185010532, (4) = 0.})]

 

I need a list version of Contourplot. I have a list in the format [[z1,x1,y1],[z2,x2,y2],...[zn,xn,yn],...]

where z represents some data value at coordinate (x,y). Basically I need a 2D figure with the x and y values shown on the axes and the z-value represented in a color code. Just like "contourplot" except in my case I cannot use it since I do not know the general function of two variables but only the list  with the data points. Is this possible with a built in Maple command?

 

Thanks

 

 

Hi, 

i have this:

and i don't want the letter to be strings.

I want something like:

[z,d,i,p,s,...,y]

Thank you a lot

So if i have a list of numbers X:=[1, 3, 8, 9, 10] for example, how do i calculate the Σx*ln(x) for each x in X ?

 

im certain it must be possible but i cant figure out how.

 

thanks for your time :)

I have the following procedure to do the above. It works but it returns [9,10],[10,9],[12,1] for n=1729(for example). How do I modify this to 

a) to count 9,10 and 10,9 as the same and hence only show one of them

b) get 1,12 to show as a solution?

cubesum:=proc(n::nonnegint)
global listcub:=table();
local k:=0, x:=iroot(iquo(n,3),3),y:=x,x3:=x^3,y3:=y^3;
if 3*x3 <> n then x=x+1; x3:=x^3;y:=x;y3:=x3 end if;
while x3<=n do
y:=iroot(n-x3,3); y3:=y^3;
if(x3+y3 = n) then k:=k+1; listcub[k]:=[x,y]end if;
x:=x+1; x3:=x^3;
end do;
convert(listcub,list);
end proc:

 

I currently have a function quadsum(n) that determines the [x,y] solutions of the above equation for an integer n. :

quadsum:= proc(n::nonnegint)
local
k:= 0, mylist:= table(),
x:= isqrt(iquo(n,2)), y:= x, x2:= x^2, y2:= y^2;
if 2*x2 <> n then x:= x+1; x2:= x2+2*x-1; y:= x; y2:= x2; end if;
while x2 <= n do
y:= isqrt(n-x2); y2:= y^2;
if x2+y2 = n then k:= k+1; mylist[k]:= [x,y] end if;
x:= x+1; x2:= x2+2*x-1;
end do;
convert(mylist, list)
end proc:

How would I alter this so that I get [x,y] for n= (5^a).(13^b).(17^c)(29^d) for non-negative integers a,b,c,d?

I am trying to take a list of prime numbers that I already generated with the following:

L4:=NULL:

for i from 2 to 50 do

if nops(ifactor(i))=1 then L4:=L4,i end if:

end do;

[L4]

This gives me the primes bewteen 2-50, [2,3,5,7,11,13,17,23,29,31,37,43,47].  I want to write something that takes the products of my list like this

2*3=6

2*3*5=30

2*3*5*7=210

and so on through the whole list.  Any ideas?  I figured out how to take the product of 2*3, 2*5, 2*7 and so on, but I cant figure how to make it do 2*3, 2*3*7 and so on.

I am doing a presentation on Euclids infinite prime proof and thought it would be cool to write a maple program that will show his proof for a certain amount of prime numbers.

 

Thanks,  Matt

 

 

 

I paste below a simple code illustrating what I want to create: two lists from a set with pairs. I wonder it is a very simple task but I my lists aren't create in the end. 

 

 

> restart;
>
> lista:=[[1,10],[2,20],[3,30]]:
> x:=[]:
> y:=[]:
>
> for i from 1 to nops(lista) do
>     for j from 1 to 2 do
>
>         if j = 1 then
>             x[i,j]:=op(1,op(i,lista));
>        fi;
>        if j = 2 then
>             y[i,j]:=op(2,op(i,lista));
>       fi;
>    od;
> od;
>
> x;
> y;

 

 

In resume then after the for loop is terminated I want to be left with two lists:

x:= [1,2,3] and y:=[10,20,30]. I'm sure it has a quick fix but I'm stuck and would appreciate any help/advice.  

Thanks in advance!

Following is the set of commands I performed.

> points := plots[implicitplot](t+sin(8*x^3*t)-x^3 = 0, t = -0.50e-1 .. 0.5e-1, x = -10/9 .. 10/9);
print(??); # input placeholder
> ptslist := convert([1, 1], points, listlist);

In an output I need the data at the specified values of t. It will be great favor, if someone can help me out.

Thanks

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?

Thanks,

jon

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

mylist[k]=sumsquare(k);

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