# Matix with equations for elements

**URL:** <https://discourse.julialang.org/t/matix-with-equations-for-elements/9632>\
**Category:** Numerics\
**Created:** [March 10, 2018, 2:04pm UTC](https://discourse.julialang.org/t/matix-with-equations-for-elements/9632 "2018-03-10T14:04:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Somayeh\_Esmaeili](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/somayeh_esmaeili/32/10955_2.png) [@Somayeh\_Esmaeili](https://discourse.julialang.org/u/Somayeh_Esmaeili)\
**Post date:** [March 10, 2018, 2:04pm UTC](https://discourse.julialang.org/t/matix-with-equations-for-elements/9632/1 "2018-03-10T14:04:33Z")

</div>

0  
down vote  
favorite

I have this constraint in my code.

i=number of supplier  
p=type of productions  
t=number of period  
constraint=@NLconstraint(con1[i=1:3,p=1:2,t=1:3],E(I)[i,p,t]=  
sum(Q[i,p,s] fors=1:t)-sum(E(D)[i,p,t]+E(W)[i,p,s] for s=1:t ))

E(I)=((sigmaI/miuI)+sigmaI)\*exp(((I[i,p,t]-miuI)/sigmaI)^2)  
E(w)[i,p,t]=((sigmaw/miuw)+sigmaw)\*exp(((w[i,p,t]-miuw)/sigmaw)^2)

they are expected value of inventory and waste of products. as well as w and I are decision variables. I would like to save all the expected value equations in one matrix[3,2,3]. Is it possible in Julia? Pleas help me. thanks all

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [March 10, 2018, 2:33pm UTC](https://discourse.julialang.org/t/matix-with-equations-for-elements/9632/2 "2018-03-10T14:33:19Z")

</div>

Seems like you already have gotten an answer on SO: [Is it possible to make a matrix including nonlinear equalities in Julia? - Stack Overflow](https://stackoverflow.com/questions/49207161/is-it-possible-to-make-a-matrix-including-nonlinear-equalities-in-julia)
