part(expr, n1) returns the n1-th part of expr and part(expr, n1,n2)
returns the n2-th part of the
n1-th part of expr. The documentation isn't clear on what part(expr,
[n1,n2]) means.
I think part(expr, [n1,n2]) behaves something like
part(expr, [n1,n2]) == apply(op(expr), [part(expr,n1),
part(part(expr,n2)]).
My recommendation is that if you want to extract a sublist of a list,
write your
own function.
Barton
"Fabrizio Caruso" <fabrizio_caruso@hotmail.com>
Sent by: maxima-admin@math.utexas.edu
12/03/2004 10:23 AM
To: maxima@math.utexas.edu
cc:
Subject: [Maxima] list manipulators
Hello,
Sorry for my newbie questions.
Is there a way to take portions of lists
which is consistent:
part([a,b,c,d,e,f],[2,2]) yields [b,b].
I think the result should be [b]
This also happens if I use create_list.
If you use these commands you'll have to check all
the times if the range is trivial.
Is there a clean way to do this?
Thanks
Fabrizio Caruso
_______________________________________________
Maxima mailing list
Maxima@www.math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima