The member function can provide the position of x in table/list s for the first variable

e.g.

f:=[a,b,c,a,a];member(a,f,'p');will provide p=1

If I would like to know the position of all a, [1,4,5], is there any simple way to obtain them? I can do something like

n:=0;

for i from 1 to 5 do

if f[i]='a' then

n:=n+1;

p[n]:=i;

end if;

end do;

something like that

Thank you very much

I know how we can add a member to a mathematical set ,for example :

C := NULL;

C := C, V, B, X;

print(C)

V, B, X

but, my problem is that how we can subtract a member from the defined set ?

Thanks,

You must be logged into your Facebook account in order to share via Facebook.

Click the button below to share this on Google+. A new window will open.

You must be logged in to your Twitter account in order to share. Click the button below to login (a new window will open.)

Please log-in to your MaplePrimes account.

Wrong Email/Password. Please try again.