# Generating data with multiple index

**URL:** <https://discourse.julialang.org/t/generating-data-with-multiple-index/46223>\
**Category:** General Usage\
**Created:** [September 7, 2020, 8:42pm UTC](https://discourse.julialang.org/t/generating-data-with-multiple-index/46223 "2020-09-07T20:42:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arega\_Getaneh](https://avatars.discourse-cdn.com/v4/letter/a/7bcc69/32.png) [@Arega\_Getaneh](https://discourse.julialang.org/u/Arega_Getaneh)\
**Post date:** [September 7, 2020, 8:42pm UTC](https://discourse.julialang.org/t/generating-data-with-multiple-index/46223/1 "2020-09-07T20:42:37Z")

</div>

```julia
J= 3 #numeber of agents
T = 24 # time horizon 
W= 100 #Numebr of scenario
d_jtw_mean = [50 ,70,90]
d_jtw_std = 0.25
d_jtw_sigma = d_jtw_std*d_jtw_mean
dd = MvNormal(d_jtw_mean, d_jtw_sigma)
d_jtw= rand(dd,W)
which gives me:
3×100 Array{Float64,2}:
  79.8875 56.4883 41.972 71.3829 … 55.0853 60.5764 46.6175 48.4329
  76.4444 76.8151 59.0371 71.5851 85.2243 59.146 34.0514 60.9782
 104.403 126.268 76.4281 49.1581 47.1082 80.8507 67.6481 79.5638
However, I expecte 3x24x100 as the data is indexed with [j,t,w];index with with 3 dimension.
Anyone who can give me a hint todo that?
Thanks.
```

---

<div class="post-metadata">

**Author:** ![yha](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yha/32/3502_2.png) [@yha](https://discourse.julialang.org/u/yha)\
**Post date:** [September 7, 2020, 8:58pm UTC](https://discourse.julialang.org/t/generating-data-with-multiple-index/46223/2 "2020-09-07T20:58:52Z")

</div>

`reshape(rand(dd,T*W),3,T,W)`

---

<div class="post-metadata">

**Author:** ![Arega\_Getaneh](https://avatars.discourse-cdn.com/v4/letter/a/7bcc69/32.png) [@Arega\_Getaneh](https://discourse.julialang.org/u/Arega_Getaneh)\
**Post date:** [September 7, 2020, 9:04pm UTC](https://discourse.julialang.org/t/generating-data-with-multiple-index/46223/3 "2020-09-07T21:04:08Z")

</div>

yha

Thank you very much
