Wolfram ResearchProductsPurchasingServices & ResourcesAbout UsOur Sites
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

Documentation / Mathematica / Built-in Functions / Lists and Matrices / Element Extraction /

Cases

FilledSmallSquare Cases[, , ... , pattern] gives a list of the that match the pattern.

FilledSmallSquare Cases[, ... , pattern -> rhs] gives a list of the values of rhs corresponding to the that match the pattern.

FilledSmallSquare Cases[expr, pattern, levspec] gives a list of all parts of expr on levels specified by levspec which match the pattern.

FilledSmallSquare Cases[expr, pattern -> rhs, levspec] gives the values of rhs which match the pattern.

FilledSmallSquare Cases[expr, pattern, levspec, n] gives the first n parts in expr which match the pattern.

FilledSmallSquare Example: Cases[2, x, 4, _Integer] LongRightArrow.

FilledSmallSquare The first argument to Cases need not have head List.

FilledSmallSquare Cases[expr, pattern :> rhs] evaluates rhs only when the pattern is found.

FilledSmallSquare Level specifications are described in Section A.3.6.

FilledSmallSquare See Section 2.3.2.

FilledSmallSquare See also: Select, Position, ReplaceList, Collect, DeleteCases.

FilledSmallSquare Related package: Statistics`DataManipulation`.

FilledSmallSquare New in Version 1.

Further Examples



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information


 © 2008 Wolfram Research, Inc.  Terms of Use  Privacy Policy | [ja] |
Sign up for our newsletter: