# Static Vector with two different units

**URL:** https://discourse.julialang.org/t/static-vector-with-two-different-units/63070
**Category:** General Usage
**Tags:** unitful, staticarrays, diferential-equation
**Created:** [June 17, 2021, 7:35am UTC](https://discourse.julialang.org/t/static-vector-with-two-different-units/63070 "2021-06-17T07:35:35Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Luapulu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/luapulu/32/17669_2.png) [@Luapulu](https://discourse.julialang.org/u/Luapulu)
#### Post date: [June 17, 2021, 7:35am UTC](https://discourse.julialang.org/t/static-vector-with-two-different-units/63070/1 "2021-06-17T07:35:35Z")

</div>

I’m working with DifferentialEquations.jl and I have a state vector in 6-dimensional phase space. I would like to work with units and static vectors but my issue is that the momentum part of the phase space vector has a different unit than the position part. How can I get the functionality of StaticVectors.jl and Unitful.jl when I need two different units in my vector?

---

<div class="post-metadata">

### Author: ![Luapulu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/luapulu/32/17669_2.png) [@Luapulu](https://discourse.julialang.org/u/Luapulu)
#### Post date: [June 17, 2021, 8:15am UTC](https://discourse.julialang.org/t/static-vector-with-two-different-units/63070/2 "2021-06-17T08:15:36Z")

</div>

I found `ArrayPartition` from [RecursiveArrayTools.jl](https://github.com/SciML/RecursiveArrayTools.jl), which might solve my problem.

Edit: Jup, this does it.
