# \#pattern-match

**URL:** https://discourse.julialang.org/tag/pattern-match/1706.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Pattern matching in Matrix](https://discourse.julialang.org/t/pattern-matching-in-matrix/123831)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 3\
**Last updated:** [December 16, 2024, 8:34am UTC](https://discourse.julialang.org/t/pattern-matching-in-matrix/123831 "2024-12-16T08:34:11Z")

</div>

Find each instance of the smaller matrix in the larger and create a NamedTuple (;a,b) \[ :X a \_ b \_ :Y \] \[ 1 2 3 :X 1 2 3 4 :Y :X 1 2 4 5 :Y 10 11 12 :X …
