92 Reputation

2 Badges

18 years, 105 days

MaplePrimes Activity

These are questions asked by Steph123


I was wondering if there is a way to return only the subscript of an element in a sequence.

Essentially I have something like t:=a[[1,2]] and I want the list [1,2] to be returned. I can't think of anyway to do this. For instance solve(t=a_x,x)...


Any help would be appreciated.




I have a list of smaller lists. E.g.


I want to write a code that views any elements where all but the first element in the smaller list agree and gets rid of spares. So in A I would want to get rid of [b,c,c] (or [d,c,c]- I don't care which one). I wrote:


Hello all,


I am sure that there is probably a simple way of doing this, but I can't figure out how. I want to take n sets. Say 2 for the moment: {a,b}, {c,d} and I want to output all the possible n-tuples (n=2) with 1 element from each set. So: [a,c],[c,a],[a,d],[d,a],[b,c].[c,b],[b,d],[d,b].


Does anyone know how I might be able to do this?

Thanks, S

In MAPLE one has the next command. > for n from 1 to 3 do n=2 then next; end if; print(n); end do; I was wondering how you could have more than one next. So instead, skip over two numbers, or three.. etc?
Is there any way that I can get MAPLE to check through an ordered set and return the first integer value? So if the set were; {2,x,h} it would return 2 {r,h,x} it would return () {3,4,5} it would return 3
1 2 Page 1 of 2