Re: Re-indexing Mathematica
- To: mathgroup at yoda.physics.unc.edu
- Subject: Re: Re-indexing Mathematica
- From: jacobson at cello.hpl.hp.com
- Date: Mon, 20 Jul 92 08:27:20 -0700
David Tindall McMath wants to have zero-based subscripting. If he is willing to use function call syntax like this ZPart[somearray,2,3], instead of regular subscript notation, like somearray[[2,3]], here is the code: ZPart[obj_,partlist___] := Part[obj,Apply[Sequence, Map[#+1&,{partlist}]]] -- David Jacobson