92 Reputation

18 years, 105 days

subscript...

Maple

Hi,

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.

Recursive...

Maple

Hi,

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

A:=[[a,b],[b,c],[b,c,c],[d,c,c]]

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:

Permutations...

Maple

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

Nezt...

Maple
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?

Elements of a set...

Maple
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
﻿