# Vector of Matrices

**URL:** <https://discourse.julialang.org/t/vector-of-matrices/87833>\
**Category:** New to Julia\
**Tags:** arrays\
**Created:** [September 26, 2022, 7:25pm UTC](https://discourse.julialang.org/t/vector-of-matrices/87833 "2022-09-26T19:25:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yoshi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yoshi/32/38259_2.png) [@yoshi](https://discourse.julialang.org/u/yoshi)\
**Post date:** [September 26, 2022, 7:25pm UTC](https://discourse.julialang.org/t/vector-of-matrices/87833/1 "2022-09-26T19:25:37Z")

</div>

I’m trying to index into an object that is a vector of 1d matrices:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/e/e/eea538e86013d01836b72565690e9022741f5e89.png)

I want the third element from every row vector. I want this returned as a column vector. How do I do this?

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [September 26, 2022, 7:28pm UTC](https://discourse.julialang.org/t/vector-of-matrices/87833/2 "2022-09-26T19:28:39Z")

</div>

`getindex.(arr, 3)` should work or `[x[3] for x in arr]` or `map(x->x[3], arr)`
