WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

FlattenAt [list,n]

flattens out a sublist that appears as the nth element of list. If n is negative, the position is counted from the end.

FlattenAt [expr,{i,j,}]

flattens out the part of expr at position {i,j,}.

FlattenAt [expr,{{i1,j1,},{i2,j2,},}]

flattens out parts of expr at several positions.

FlattenAt [pos]

represents an operator form of FlattenAt that can be applied to an expression.

Details
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Properties & Relations  
Possible Issues  
Tech Notes
  • Sequences
  • History
    Cite this Page

    FlattenAt [list,n]

    flattens out a sublist that appears as the nth element of list. If n is negative, the position is counted from the end.

    FlattenAt [expr,{i,j,}]

    flattens out the part of expr at position {i,j,}.

    FlattenAt [expr,{{i1,j1,},{i2,j2,},}]

    flattens out parts of expr at several positions.

    FlattenAt [pos]

    represents an operator form of FlattenAt that can be applied to an expression.

    Details

    Examples

    open all close all

    Basic Examples  (2)

    Flatten at position 2:

    Flatten at positions 2 and 4:

    Scope  (3)

    FlattenAt can splice the arguments of any expression, not just lists:

    Consider a matrix:

    Flatten the first element (row) of the matrix:

    Equivalently:

    Flatten at position 1,2 (the element in the first row, second column):

    Flatten at positions 1 and 2 (the rows) of the matrix:

    Create an operator form of FlattenAt :

    Apply the operator to different expressions:

    Properties & Relations  (2)

    For lists, FlattenAt [list,pos] is equivalent to MapAt [Splice,list,pos]:

    For a general expression, FlattenAt [expr,pos] is equivalent to MapAt [Delete [0],expr,pos]:

    Possible Issues  (1)

    FlattenAt removes the head of the expression at the specified position:

    Use MapAt with Flatten to remove inner heads from a specified position:

    History

    Introduced in 1991 (2.0)

    Wolfram Research (1991), FlattenAt, Wolfram Language function, https://reference.wolfram.com/language/ref/FlattenAt.html.

    Text

    Wolfram Research (1991), FlattenAt, Wolfram Language function, https://reference.wolfram.com/language/ref/FlattenAt.html.

    CMS

    Wolfram Language. 1991. "FlattenAt." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FlattenAt.html.

    APA

    Wolfram Language. (1991). FlattenAt. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FlattenAt.html

    BibTeX

    @misc{reference.wolfram_2025_flattenat, author="Wolfram Research", title="{FlattenAt}", year="1991", howpublished="\url{https://reference.wolfram.com/language/ref/FlattenAt.html}", note=[Accessed: 04-January-2026]}

    BibLaTeX

    @online{reference.wolfram_2025_flattenat, organization={Wolfram Research}, title={FlattenAt}, year={1991}, url={https://reference.wolfram.com/language/ref/FlattenAt.html}, note=[Accessed: 04-January-2026]}

    Top [フレーム]

    AltStyle によって変換されたページ (->オリジナル) /